▲ | tayiorrobinson 7 hours ago | |
> That's why there is such a thing as a React compiler - a good sign that you're not writing JS, which doesn't have compilers. You say that like it's a bad thing - but it didn't stop Babel or TypeScript from being popular, both of which need a compiler. And being honest, I don't like extra tools in my chain, which is probably why I don't use React proper, but that proves you don't need anything React specific for anything other than optimisation The only syntax you really want for React is JSX. Which is just because writing React.createElement("div" ...) every time is unergomomic. JSX isn't specific to React. It could easily be a language feature, in fact it is an OOTB language feature of TypeScript. > React is full of magic syntax that looks like functions, but e.g. you can't call them inside an if statement They look like function calls, because they are. They're not "magic syntax", and in fact, those rules are explicitly because theres no way around that without implementing special syntax |