Babel

Using babel from browser

Taken from here

1
2
3
4
5
6
7
8
<script src="https://cdnjs.cloudflare.com/ajax/libs/babel-standalone/6.24.0/babel.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/15.1.0/react-dom.min.js"></script>

<body>
<div id="root"></div>
<script type="text/babel" src="pomodoro.js"></script>
</body>

Note: Use ReactDOM.render instead of React.render.

Plugins

  • rawact - [POC] A babel plugin which compiles React.js components into native DOM instructions to eliminate the need for the react library at runtime.

Comments

⬆︎TOP