2 ms·
React can be added to a page with just a script tag in the same way as Vue: https://reactjs.org/docs/add-react-to-a-website.html https://reactjs.org/docs/add-r
by acemarke 6y ago
React can be added to a page with just a script tag in the same way as Vue:
https://reactjs.org/docs/add-react-to-a-website.html https://reactjs.org/docs/add-react-to-a-website.html
Having said that, React is normally used with JSX syntax, which requires a compile step.
You _can_ use it with "raw" `React.createElement()` calls, but that's generally unwieldy and almost no one does that.
However, there's a very neat library called https://github.com/developit/htm https://github.com/developit/htm , which is an almost-JSX-compatible syntax that uses JS template literal strings, and requires no compile step.