InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

React FAQ

  • JSXTransformer vs babel
  • React.render vs ReactDOM.render
  • React.DOM factory methods
  • Error - Adjacent JSX elements must be wrapped
 
  • Home
  • > Tutorials
  • > Javascript
  • > React
  • > React FAQ

React – JSXTransformer vs babel – which one should be used?

on Feb 11, 2016

Question: I see tutorials using JSXTransformer and babel in various articles. Which one should be used?

React was using JSXTransformer to compile and transform jsx earlier. This was deprecated in favour of babel (the compiler for next generation javascript) in release 0.14. Many tutorials are still using JSXTransformer code which looks like:

<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.

Suggested posts:

  1. React javascript render hello world
  2. jquery ajax – post form having file uploads
  3. Comic strip – Startup and losses
  4. Python xrange examples
  5. PHP array map example
  6. CSS transform – skew (skewX and skewY)
  7. React jsx hello world with offline transformation
  8. React basic clock example using setInterval
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged React FAQ, Tutorials
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress