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

Optimise React for production builds #46

Closed
gmarty opened this issue Apr 1, 2016 · 2 comments
Closed

Optimise React for production builds #46

gmarty opened this issue Apr 1, 2016 · 2 comments

Comments

@gmarty
Copy link
Collaborator

gmarty commented Apr 1, 2016

Babel react conserves the propTypes of components (which is both expected and wanted).
But in production mode they add no benefits to the components so we want to remove them.

Let's enquire and see if it's a common practice in the React world and if there are already tools to do that.

@gmarty gmarty changed the title Remove the propTypes from the production scripts Optimise React for production builds Apr 12, 2016
@gmarty
Copy link
Collaborator Author

gmarty commented Apr 12, 2016

It turns out there are a couple more optimisations we can do to make more efficient production build of React:
https://medium.com/doctolib-engineering/improve-react-performance-with-babel-16f1becfaa25

@gmarty
Copy link
Collaborator Author

gmarty commented Apr 21, 2016

We also need to use the .min.js versions of React scripts for better performance in production.

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

No branches or pull requests

2 participants