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

Test utils act() disables normal deferred rendering #1681

Closed
robertknight opened this issue Jun 5, 2019 · 2 comments · Fixed by #1683
Closed

Test utils act() disables normal deferred rendering #1681

robertknight opened this issue Jun 5, 2019 · 2 comments · Fixed by #1683

Comments

@robertknight
Copy link
Member

When the act function is called for the first time, it installs a debounceRendering hook in order to be able to flush effects and state updates synchronously.

It does not restore the hook before it returns. As a result, any subsequent effects or setState calls which get executed outside the act() call will no longer trigger deferred rendering, which is a pretty confusing experience to debug.

Is there any reason not to restore any options hooks before act returns?

@JoviDeCroock
Copy link
Member

JoviDeCroock commented Jun 5, 2019

Good point, I'll fix this when I get home :D thanks for noticing it. I'll probably try and dive into the other issue as well (no objects as children).

@robertknight
Copy link
Member Author

Thanks @JoviDeCroock. If there is any way I can help, please let me know!

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 a pull request may close this issue.

2 participants