Skip to content

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