Skip to content

bugfix: shouldComponentUpdate #48

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

Merged

Conversation

ovaldi
Copy link
Contributor

@ovaldi ovaldi commented Nov 28, 2018

#47

@nicgordon
Copy link

While you're here, the first argument of shouldComponentUpdate is actually nextProps not prevProps.

@markusguenther
Copy link
Member

Yes @nicgordon is right. https://reactjs.org/docs/react-component.html#shouldcomponentupdate

Thank you to both of you. I really appreciate the help and love the community around reacts for being so kind. I will test It soonish and also adjust the props.

🙏🏼

The shouldComponentUpdate API defines that the arguments are
nextProps and nextState. So we replace prevProps with nextProps.
Copy link
Member

@markusguenther markusguenther left a comment

Choose a reason for hiding this comment

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

Thanks for reporting and fixing @ovaldi

@markusguenther markusguenther merged commit 9736ef6 into FriendsOfReactJS:master Dec 5, 2018
@markusguenther
Copy link
Member

🎉 This PR is included in version 3.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants