4 ms·
JSX isn't and hasn't even been necessary to use React. The first version of my company's site didn't have a build step and called createElement manually. And i
by bastawhiz 1y ago
JSX isn't and hasn't even been necessary to use React. The first version of my company's site didn't have a build step and called createElement manually.
And in the decade I've been writing for React, I've never used the React compiler. But saying that it's proof that it's not JavaScript it's like saying that V8 is proof that JavaScript is too complicated because otherwise it would be fast enough not to need a JIT.
And all those rules? You don't have to follow them either. Use class components. They're still there, and they work fine.
- michaelcampbell 1y agoIf you also have experience using JSX in a React app, I'd love to hear any opinions/experiences you have with doing the JSX style vs createElement() style coding. I understand how they map to each other but I've only done JSX. That said, I'm old so calling functions all over the place is in my wheelhouse, and I'd love to hear from folks who have done both.
- b_e_n_t_o_n 1y agoI'm a fan of this lib [0] (with some personal modifications). It's prefer it over JSX, but I use JSX because it's usually simpler. 0: https://github.com/sultan99/react-on-lambda https://github.com/sultan99/react-on-lambda
- bastawhiz 1y agoIt's verbose, but it's not all that bad for small applications. Especially when you don't want a build step or tooling. In today's day and age, you can have your favorite LLM do the verbose parts for you if you really want.