This content originally appeared on CSS-Tricks and was authored by Chris Coyier
I think you’ll find it quite refreshing to use React A) with a JSX-like syntax, and B) without any kind of build tooling.
Refreshing indeed:
It’s not really the React that’s the hard part to pull off without build tools (although I do wonder what we lose from not tree shaking), it’s the JSX. I’m so used to JSX I think it would be hard for me to work on a front-end JavaScript project without it. But I know some people literally prefer a render function instead. If that’s the case, you could use React.createComponent
directly and skip the JSX, or in the case of Preact, use h
:
I work on a project that uses Mithril for the JavaScript templating which is a bit like that, and it’s not my favorite syntax, but you totally get used to it (and it’s fast):
Direct Link to Article — Permalink
The post React Without Build Tools appeared first on CSS-Tricks.
You can support CSS-Tricks by being an MVP Supporter.
This content originally appeared on CSS-Tricks and was authored by Chris Coyier
Chris Coyier | Sciencx (2021-03-03T13:42:36+00:00) React Without Build Tools. Retrieved from https://www.scien.cx/2021/03/03/react-without-build-tools/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.