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

fix: move React flushSync to microtask #3188

Merged
merged 1 commit into from
Sep 13, 2022

Commits on Sep 13, 2022

  1. fix: move React flushSync to microtask

    To avoid seeing the `Warning: flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.` error, we need to move the `flushSync()` code that avoids automatic batching to a microtask to not fire a lifecycle event `setState()` during rendering.
    
    Fixes warning introduced in ueberdosis#2985
    Daniel Spitzer committed Sep 13, 2022
    Configuration menu
    Copy the full SHA
    57ba4ff View commit details
    Browse the repository at this point in the history