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

use the latest handler passed in by the props #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zthomas
Copy link

@zthomas zthomas commented Apr 29, 2016

Since the shouldComponentUpdate only checks props.content and props.config, if you change an event handler, the component will still be using the previous handler. A simple fix would be to just always get the latest handler from the props to call instead of using the one stored in the closure.

Just a suggestion, but it is a bug that I had to address in production.

Since the shouldComponentUpdate only checks content and config, if you change an event handler, the component will still be using the previous old handler. A simple fix would be to just always get the latest handler from the props to call instead of using the one stored in the closure. 

Just a suggestion, but it is a bug that I had to address in production.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant