-
Notifications
You must be signed in to change notification settings - Fork 47.7k
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
Add DEV mode note to installation doc (#8784) #9157
Conversation
docs/docs/installation.md
Outdated
@@ -47,6 +47,10 @@ While React [can be used](/react/docs/react-without-es6.html) without a build pi | |||
|
|||
### Installing React | |||
|
|||
>**Note:** | |||
> | |||
>Once installed, we strongly recommend setting the [production mode flags](/react/docs/optimizing-performance.html) to ensure you're using the fast version of React in production. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say the optimized version instead of fast
docs/docs/installation.md
Outdated
@@ -47,6 +47,10 @@ While React [can be used](/react/docs/react-without-es6.html) without a build pi | |||
|
|||
### Installing React | |||
|
|||
>**Note:** | |||
> | |||
>Once installed, we strongly recommend setting the [production mode flags](/react/docs/optimizing-performance.html) to ensure you're using the fast version of React in production. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe let's say "set up a separate production build process" or something like this? To indicate you don't need to do it for development, but that you need to separate how you develop from how you deploy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sgtm. I'll update to include wording closer to setting up a separate build process to avoid shipping dev mode.
@gaearon Updated. PTAL whenever you get a chance. |
There’s some duplication between "Installation" and "Optimizing Performance": https://facebook.github.io/react/docs/installation.html#development-and-production-versions Maybe we should create a new top-level page called "Development and Production"? Or maybe we could remove the section in either doc. Installation would be a better place for it IMO, as we want to show it as early as possible. What do you think? |
I felt similarly when reading through!
I think installation does indeed sound like a better place for it. How would you feel about consolidating the "Use the production build" section of https://facebook.github.io/react/docs/optimizing-performance.html#use-the-production-build into the installation guide? We'd drop it from the former and slightly expand https://facebook.github.io/react/docs/installation.html#development-and-production-versions with anything missing. |
I missed the difference between the Development and Production builds my first go around. It wasn't until the Can we change |
Sounds good. |
@addyosmani Is there still interest in following up on my last comment? |
@gaearon Yep! Let me dust off this PR and rework it a little. |
Note we also changed the Installation page to show tabs. |
I'll get this in because I did the rest in #9592. |
Thanks for all the hard work getting these (and the React DevTools) changes in, Dan! Super appreciate it. |
@gaearon First pass at adding a note to the installation guide reminding folks to use production mode flags. I've initially placed this before the install steps as it's a pretty prominent place. Any feedback welcome.