4 ms·
I can’t recall a single time where I would want to put JSX in an „if” statement.. In fact I can’t recall a single time where I would want to use JSX in a differ
by TomaszZielinski 1y ago
I can’t recall a single time where I would want to put JSX in an „if” statement.. In fact I can’t recall a single time where I would want to use JSX in a different context than the return value of a render phase.
So from my personal experience the things you mentioned are non-issues in practice. Do you have a different experience?
- jitl 1y agoyes
- mike_hearn 1y agoI was actually meaning the hooks and memoization stuff not JSX. I think JSX can be put inside conditional logic and loops.
- TomaszZielinski 1y agoAh OK, I see it now—I focused too much on the „magic syntax”. As for hooks, I guess I mentally treat them as magic that lives in its own lane, and so I've never really thought that I could do anything with them, other than what the manual prescribes.