Hacker News new | ask | show | jobs
by Capricorn2481 1071 days ago
Because React is JS and Svelte isn't
1 comments

React is JSX*

Nothing preventing them from making an <If condition={…}>…<Else>… component

And this is typically how conditionals work in SolidJS, which also uses JSX but adds extra core components to handle conditionals and iteration. In fairness, this is largely because they can better support the reactivity model that SolidJS uses, but it's a convenient side effect.