How I converted my simple react app to ES6 using babelify and gulp
Oct 3, 2015
Here is a repo which implements a simple IMGUR browser client in react. It uses react router. It does not utilize the newest javascript ES6 standard. Writing and converting a simple react app to ES6 allowed me to learn ES6 and in the process allowed me to figure out a way to change my gulp build settings to use the babel transpiler for ES6.
Non-ES6 simple react class
ES6 version of a similar react-router class
Adding babel to Gulp file to transpile ES6 into ES5
Add babelify npm package using ** npm add babelify –save **
In your gulp file require babelify
use transform(babilify) in your bundle method. Code given below… A link to the repo where this is working…