3 ms·
Nested ternaries can by structured to look a look like `if/else` if you put the `?/:` in the right spots. It's a balance. Extracting logic into new components
by kingdomcome50 5y ago
Nested ternaries can by structured to look a look like `if/else` if you put the `?/:` in the right spots.
It's a balance. Extracting logic into new components (and often new files!) isn't exactly ergonomic either.
I've found it's better to decrease readability if it makes understanding the logic more straight-forward (i.e. not hunting through several files to exhaust all possible outputs).