Jul 16, 2023
Decent approach, but it presumes each section is homogenous in regard to cell type and you didn't eliminate the switch as it's embedded within the setup function.
Though to be fair, the article title said "avoid', not "eliminate".
Also in the future please use Medium's code editor as opposed to screenshots. The code editor is easier to read and the code examples can actually be copy/pasted.