3 ms·
Not sure if it fits your use-case, but if you just want to just throw a couple of react classes on your page, without having to go through all the hassle of set
by masterofmisc 7y ago
Not sure if it fits your use-case, but if you just want to just throw a couple of react classes on your page, without having to go through all the hassle of setting up a react app (without NPM or WebPack), you could just live transpile react using babel-standalone.
https://babeljs.io/docs/en/babel-standalone https://babeljs.io/docs/en/babel-standalone
Apparently sites like JSFiddle use babel standalone for live compilation.
Here is a GitHub Gist example:
https://gist.github.com/OceanAirdrop/52b2042da21ef52ac5ead0e9e67197d3 https://gist.github.com/OceanAirdrop/52b2042da21ef52ac5ead0e...
Just remember to wrap your script tags with the "text/babel" type