using babel for react compiling in browser
this is currently just an idea, as i saw that codepen uses babel to run react i was wondering i can do the same thing here and then just write normal react script and have babel compile it.
so it may not work! :)
Installing babel standalone
ok that works, this is just babel working standalone, how to combine this with react?
<!-- Load Babel --> <!-- v6 <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script> --> <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
const getMessage = () => "Hello World"; document.getElementById('output').innerHTML = getMessage();