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

Add DEV mode note to installation doc (#8784) #9157

Merged
merged 2 commits into from
May 3, 2017

Conversation

addyosmani
Copy link
Contributor

@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.

image

@@ -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.
Copy link

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

@@ -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.
Copy link
Collaborator

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.

Copy link
Contributor Author

@addyosmani addyosmani Mar 12, 2017

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.

@addyosmani
Copy link
Contributor Author

@gaearon Updated. PTAL whenever you get a chance.

@gaearon
Copy link
Collaborator

gaearon commented Mar 12, 2017

There’s some duplication between "Installation" and "Optimizing Performance":

https://facebook.github.io/react/docs/installation.html#development-and-production-versions
https://facebook.github.io/react/docs/optimizing-performance.html#use-the-production-build

Maybe we should create a new top-level page called "Development and Production"?
Then we can link to it from both places and put it after "Installation".

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?

@addyosmani
Copy link
Contributor Author

There’s some duplication between "Installation" and "Optimizing Performance":

I felt similarly when reading through!

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 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.

@ChrisBarthol
Copy link

ChrisBarthol commented Mar 12, 2017

I missed the difference between the Development and Production builds my first go around. It wasn't until the Warning: It looks like you're using a minified copy of the development build of React on my production test site that I realized there were separate builds. Having this as early as possible would be helpful.

Can we change fast version of React in production and replace it with minified production version of React

@gaearon
Copy link
Collaborator

gaearon commented Mar 13, 2017

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.

Sounds good.

@gaearon
Copy link
Collaborator

gaearon commented Apr 18, 2017

@addyosmani Is there still interest in following up on my last comment?

@addyosmani
Copy link
Contributor Author

@gaearon Yep! Let me dust off this PR and rework it a little.

@gaearon
Copy link
Collaborator

gaearon commented Apr 19, 2017

Note we also changed the Installation page to show tabs.

@gaearon gaearon merged commit f86256e into facebook:master May 3, 2017
@gaearon
Copy link
Collaborator

gaearon commented May 3, 2017

I'll get this in because I did the rest in #9592.
Thanks!

gaearon pushed a commit that referenced this pull request May 3, 2017
* Add DEV mode note to installation doc (#8784)

* Address feedback from Dan on wording

(cherry picked from commit f86256e)
@addyosmani
Copy link
Contributor Author

Thanks for all the hard work getting these (and the React DevTools) changes in, Dan! Super appreciate it.

flarnie pushed a commit that referenced this pull request Jun 12, 2017
* Add DEV mode note to installation doc (#8784)

* Address feedback from Dan on wording

(cherry picked from commit f86256e)
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.

5 participants