Closed mattikl closed 9 years ago
@mattikl cool! Thanks for catching this, I was gonna switch this to use import
very soon. I assume this solution was all you needed to get it working?
@banderson Yes, that was all. I tested by creating a new project, which compiled & ran without errors, then switched one of the require
's to import
and it worked too. Babelify transpiles .jsx with default settings.
I actually started this branch to make the component generator return ES6 classes. I'll add that change too.
@banderson After some thought I think it's too early to switch to ES6 classes in the component generator. First the example app should be written using them not to get too confusing for the user, and there are still benefits to using React.createClass
like autobinding this
in class methods.
But the import
syntax is nice and store implementation is cleaner when you can use class inheritance instead of object-assign
.
@mattikl agreed! Can you change this back to use createClass
and I'll merge?
@banderson I rebased and force pushed the branch, so it now includes only the first commit. Thanks!
@mattikl :+1: thanks!
@mattikl just an FYI, your changes were included in the v0.4.0 release just a few minutes ago
If reactify gets run first, ES6 syntax not supported by reactify (hit this error with using the import syntax) causes parse errors.