3 ms·
>I suspect they want better condition handling. Because JavaScript lacks a useful conditional expression beyond ternary expressions, condition handling in JSX g
by tauchunfall 3y ago
>I suspect they want better condition handling. Because JavaScript lacks a useful conditional expression beyond ternary expressions, condition handling in JSX generally uses boolean operators or ternary expressions.
If a condition in JSX gets too complex I normally extract a component-level function and call it from the JSX part of the component.