Skip to content

Recommmended PureComponent instead of shallowCompare #110

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

Conversation

ishankbahl
Copy link
Contributor

@ishankbahl ishankbahl commented Oct 10, 2017

Issue #84

Recommended PureComponent instead of shallowCompare on Addons page.

image

@reactjs-bot
Copy link

reactjs-bot commented Oct 10, 2017

Deploy preview ready!

Built with commit 702fddd

https://deploy-preview-110--reactjs.netlify.com

Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

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

I think it might be nicer to change the wording slightly:

We recommend using React.PureComponent instead.

But otherwise this looks okay 👍

Unfortunately it looks like an earlier PR has caused a merge conflict. Would you rebase this so I can merge it?

<<<<<<< HEAD
- [`PureRenderMixin`](pure-render-mixin.html). Use [`React.PureComponent`](/docs/react-api.html#reactpurecomponent) instead.
- [`shallowCompare`](shallow-compare.html), a helper function that performs a shallow comparison for props and state in a component to decide if a component should update. We recommend using [`React.PureComponent`](/docs/react-api.html#reactpurecomponent) instead.
=======
- [`PureRenderMixin`](pure-render-mixin.html). Use [`React.PureComponent`](/docs/react-api.html#reactpurecomponent) instead.
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like this didn't get merged correct

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I'm so silly.

@bvaughn bvaughn merged commit 7060923 into reactjs:master Oct 10, 2017
@bvaughn
Copy link
Contributor

bvaughn commented Oct 10, 2017

Thanks 😄

jhonmike pushed a commit to jhonmike/reactjs.org that referenced this pull request Jul 1, 2020
@boniattirodrigo 
LGTM 👍 

 PR aprovada! Obrigado pela contribuição!
BetterZxx pushed a commit to BetterZxx/react.dev that referenced this pull request Mar 21, 2023
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