improving-minnesota / react-redux-timesheet

The timesheet project for the react-redux workshop
https://react-redux-timesheet.netlify.com
29 stars 197 forks source link

Use ES7 class arrow functions to autobind #2

Open jeffsheets opened 7 years ago

jeffsheets commented 7 years ago

It was suggest in last workshop to change our components to use ES7 class level arrow functions to eliminate all the binding. To essentially autobind this for us.

Sounds like a good idea to me, even as an experimental ES7 proposal, it would help eliminate a bunch of cruft from our workshop lab files.

http://blog.andrewray.me/react-es6-autobinding-and-createclass/

meyerds commented 6 years ago

Playing devil's advocate: https://medium.com/@charpeni/arrow-functions-in-class-properties-might-not-be-as-great-as-we-think-3b3551c440b1