Hacker News new | ask | show | jobs
by TomaszZielinski 283 days 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?

2 comments

I was actually meaning the hooks and memoization stuff not JSX. I think JSX can be put inside conditional logic and loops.
Ah 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.

yes