Is there a way to unleash the full might of ES6 with React JSX?

Question!

I'm currently using browserify with reactify plugin to compile jsx code for ReactJS components. This allows me to use certain subset of ES6 in the code (arrow functions, string interpolation etc).

Is there a possibility to use full ES6 (having it compiled down to ES5) with JSX? I think I can't just run ES6TO5 on JSX files before they are processed because of syntax error. Running reactify on ES6 code will give syntax error, I believe also.

Is there a way to use full ES6 with ReactJS and JSX?



Answers
You can use Babel to compile "full" (ie, what we have now) ES6/ES2015 using JSX. You can check out Babel's website to see how to do it: How to use JSX.



Yes, there is! I spent a while Googling around only to come up empty handed, so I made a skeleton project:

https://github.com/imcnally/react-es6-gulp-playground

ES6 and React, held together with browserify and gulp.

By : ian


This video can help you solving your question :)
By: admin