Hacker News new | ask | show | jobs
by pier25 2098 days ago
Modern React uses JSX which is then transformed at build time into function calls.

You can write those function calls yourself, but it would be a tremendous PITA.

1 comments

In this case, you could use `htm`: https://github.com/developit/htm#usage
That's cool- but unless you're targeting greenfield browsers only you aren't going to use the syntax in that documentation without a build step or using the babel transpiler directly in the browser which, while cool from a POC standpoint, isn't a good solution. At that point you might as well just add build tools and use JSX or whatever the framework you're trying to use intended or otherwise is well documented.
Yeah totally. Or even use Preact by the same author which is smaller and faster than React.