-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix bug that introduced a race condition in consumers #2373
Conversation
Hey @AndrewMusgrave , remember when we were talking about hookifying the DatePicker and we decided that we could simplify the code a bit and execute a callback sequentially instead of waiting for state changes to resolve? Remember when I said
And then you said
?? Well guess what 🙃🙃🙃🙃🙃🙃🙃🙃🙃🙃🙃🙃🙃 |
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.
Thanks for following up on this 😄
c219d5c
to
446f3e9
Compare
446f3e9
to
03c98b6
Compare
WHY are these changes introduced?
Fixes #2333
WHAT is this pull request doing?
See #2089 (comment)
When I converted DatePicker to a functional component using hooks, I decided to simplify the code a bit as well. Since our tests and examples for the DatePicker are not thorough, this introduced a race condition that was hard to test locally. The only browser that triggered this condition consistently was Firefox, and only when also using the
Month
component.This fixes that by waiting until state changes have resolved to trigger the callback
How to 🎩
yarn run build-consumer web
and check out the analytics page on FF, as per the original issue