-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Prevent rerender when a button callback returns false. #7197
Conversation
This pull request is automatically deployed with Now. Latest deployment for this branch: https://monorepo-git-fork-danrha-next.storybook.now.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Don’t see how this would have any negative impact. Thanks for contributing.
Co-Authored-By: Wei-Wei Wu <hello@weiweiwu.me>
As this is something minor, is it possible to add this fix to the next 5.1.x release instead of waiting for 5.2? Thanks guys! |
Prevent rerender when a button callback returns false.
Issue: #6675
What I did
I added a validation after firing knob click callback to prevent the story from re-rendering.
I'm not really sure why the default behavior is needed, but it's breaking my use case and according to #6675 someone else's.
I updated knobs documentation accordingly.