Question: I see tutorials using JSXTransformer and babel in various articles. Which one should be used?
<script src="/some_path/JSXTransformer.js"></script> <script type="text/jsx"> ReactDOM.render( <h1>Hello world</h1>, document.getElementById('hello') ); </script>
In case you are starting from scratch and latest version of react, you should use babel for jsx code and avoid legacy JSXTransformer. Here is how it should look like:
... <script src="https://cdnjs.cloudflare.com/ajax/libs/babel-core/5.8.23/browser.min.js"></script> <script type="text/babel"> ReactDOM.render( <h1>Hello world</h1>, document.getElementById('hello') ); </script>
You may want to read more information at Deprecating JSTransform and react-tools.