prakhar1989 / react-surveyman

SurveyMan in React
http://prakhar.me/react-surveyman
BSD 2-Clause "Simplified" License
154 stars 27 forks source link

Move to ES6 classes #31

Open prakhar1989 opened 9 years ago

prakhar1989 commented 9 years ago

Move the React components to ES6 classes. Refer - http://babeljs.io/blog/2015/06/07/react-on-es6-plus/

etosch commented 9 years ago

+1 for es6!

  Emma Tosch   etosch@fastmail.fm

On Wed, Jul 8, 2015, at 03:34 AM, Prakhar Srivastav wrote:

Move the React components to ES6 classes. Refer - http://babeljs.io/blog/2015/06/07/react-on-es6-plus/

— Reply to this email directly or view it on GitHub[1].

Links:

  1. https://github.com/prakhar1989/react-surveyman/issues/31
prakhar1989 commented 9 years ago

Haha! I've been using a few ES6 features quite extensively in this project such as arrow functions, rest and spread operators, template strings and default arguments. Unfortunately, I had been missing out on the ES6 classes since it required much more changes in code (eg. you need to manually bind all your functions in your React component). However, the post linked above is quite helpful and reading it makes me want to jump on the es6 wagon all the way through! :grinning: