andreypopp / reactify

[DEPRECATED] Browserify transform for JSX (superset of JavaScript used in React library by Facebook)
MIT License
690 stars 68 forks source link

Consider Deprecating in favor of babelify #75

Closed jjmasse closed 8 years ago

jjmasse commented 9 years ago

I have used this a bit to help with JSX and ES6 transpiling, and thank you very much for this project.

In recent research on other common utilities, node-jsx for example, it seems like a better option to use https://github.com/babel/babelify instead of reactify.

Unless reactify has some additional features specific to JSX + ES transpiling I am missing.

Thank you for your work, either way this module has been really helpful.

DjebbZ commented 8 years ago

I'd say no. I was just now wondering the same thing, and decided to try reactify instead of babelify in the commercial project I'm working on that uses React, JSX and a few dependencies like redux, react-redux, react-bootstrap, bluebird, moment, etc. I built it with an npm script and babelify like this :

browserify src/index.js -t babelify -t lessify -t [ uglifyify -x .js ] -t [ envify --NODE_ENV production ] | uglifyjs -c -o [OUTPUT_PATH]

then just switched babelify for reactify (just installed, so latest version). My bundle ended up ~40kB smaller for the exact same code base. The build process also ran ~20 seconds faster (measured using time). So I'm switching to reactify.

If you don't depend on specific babel features, I encourage you to try reactify and measure time/size.

By the way, thank you for raising this issue, it gave me the idea to try and made my build process better :+1:

deadbeef404 commented 8 years ago

Please note, in react v15.0.0, React.__spread has been removed. Reactify (via react-tools) uses this and thus will not be usable for React v15 code, although, it looks like they may be kicking the can down the road a bit by temporarily bringing it back.

But as react-tools is deprected, reactify at this time will not be usable for v15 onwards.