Nov 7, 2022
I actually refactor all my codebases to do the exact opposite of what you're suggesting. I always remove ternaries, especially useless ternaries that are end with null, because they're hard to read.
You shouldn't return 0 or undefined from a React component, and it's easy enough to check for the 0 and return null if that's a problem.