Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC ReactSlim/Modern build #7892

Closed
wants to merge 1 commit into from

Conversation

iamdustan
Copy link
Contributor

Calling it modern feels weird although modern and classic are the internal folder names.

There’s been some chatter about createClass and PropTypes being generally in maintenance mode as class and Flow are the future. I was playing around with the build system anyway (see #7850 and https://twitter.com/iamdustan/status/783701952483856384) so decided to try to create a build removing createClass and DOMFactories. Potentially createFactory and createMixin could be removed as well.

The build of react-slim.js vs react.js is displayed in the screenshot below:
screen shot 2016-10-05 at 9 14 54 pm

Diff

react-slim vs react: -31,869
react-slim.min vs react.min: -5,755

Removing PropTypes may be problematic due to context still using it? This is part of an experiment I’m considering that would convert https://github.com/reactjs/react-codemod/blob/master/transforms/class.js to a babel transform to run over arbitrary components outside of direct control (aka babel over node_modules. Heresy, heresy!)

@iamdustan
Copy link
Contributor Author

Naturally there are more snags that may impede the practicality of this. I’m looking at you mixins.

@gaearon
Copy link
Collaborator

gaearon commented Apr 21, 2017

We replaced the build system so closing. We'll get an equivalent into 16 though!

@gaearon gaearon closed this Apr 21, 2017
@iamdustan iamdustan deleted the experimental-slim-build branch April 21, 2017 14:31
@iamdustan
Copy link
Contributor Author

👍 Pretty sure 16 has improved on this already 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants