I just avoid most of it by moving the complex conditional logic into a separate component and rendering that.
I don't think I've run into many issues with this strategy, and keeps my return statements nice and clean.
I don't think I've run into many issues with this strategy, and keeps my return statements nice and clean.
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).