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 link and examples for purecomponents #8477

Closed
wants to merge 1 commit into from
Closed

Add link and examples for purecomponents #8477

wants to merge 1 commit into from

Conversation

lucas-aragno
Copy link
Contributor

Discussed here: #8255 cc @lacker

@lucas-aragno
Copy link
Contributor Author

Also I found some errors on the other page: #8478

@gaearon
Copy link
Collaborator

gaearon commented Jan 4, 2017

My overall feeling from this is it places too much emphasis on PureComponent and makes readers feel bad for not using it. This is not what we want to convey in this doc. We want people to know it exists and know basics of using it, but we only want them to use it when they have determined (with profiling) that it helps in a particular situation. Applying it blindly in some cases can make the app slower than it was.

Since Optimizing Performance already mentions PureComponent maybe it's worth changing it instead to include a separate heading (e.g. "Using React.PureComponent") . Then you can add a link from PureComponent reference to that section.

@lucas-aragno
Copy link
Contributor Author

I see your point. I didn't get too well your last point, are you suggesting to remove the example and add a heading linking to optimising performance or move the example down to it's own heading ?

Copy link
Collaborator

@sebmarkbage sebmarkbage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested above.

@notgiorgi
Copy link

@gaearon

Applying it blindly in some cases can make the app slower than it was.

How could this happen? I understand that, it might miss renders while data updates using mutations, but how === could be slower than deepEqual?

@bvaughn
Copy link
Contributor

bvaughn commented Oct 6, 2017

Thank you for submitting this PR! 😄

Unfortunately the documentation and source code for reactjs.org has been moved to a different repository: https://github.com/reactjs/reactjs.org

I realize this PR is old and there may no longer be interest in seeing it merged. If there is, please open a new PR there. Sorry for the inconvenience!

(For more backstory on why we moved to a new repo, see issue #11075)

@bvaughn bvaughn closed this Oct 6, 2017
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.

7 participants