Normally I have worked with the stage-0 preset in babel. It adds a lot of newer javascript features that make writing React classes really nice. Like the object spread, class variables, binding functions, etc. Check it out here:
Sounds good. couple thoughts/questions
-reasonable likelihood those features make it to es7?
-I thought object spread was already available (maybe I used it differently)
Normally I have worked with the
stage-0
preset in babel. It adds a lot of newer javascript features that make writing React classes really nice. Like the object spread, class variables, binding functions, etc. Check it out here:https://babeljs.io/docs/plugins/preset-stage-0/
It's as simple as adding
stage-0
to the babel config, and installing the npm package for it.