Skip to content

Flare: change flushDiscreteUpdates invariant to warning #15702

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

trueadm
Copy link
Contributor

@trueadm trueadm commented May 21, 2019

When testing #15687 internally, we encountered some issues where the invariant in flushDiscreteUpdates fired during legit tests. On further inspection, using invariant was maybe too strong, so this has been downgraded to a warning in DEV.

expect(() => {
node.click();
}).toWarnDev(
'Warning: unstable_flushDiscreteUpdates: Cannot flush updates when React is already rendering.',
Copy link
Collaborator

@acdlite acdlite May 21, 2019

Choose a reason for hiding this comment

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

Should bikeshed this message before it hits open source

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll leave you the key to the bikeshed. Help yourself.

@trueadm trueadm merged commit e180f65 into facebook:master May 22, 2019
@trueadm trueadm deleted the discrete-flush-invariant-to-warning branch May 22, 2019 00:09
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.

3 participants