Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move React
flushSync
to microtask (ueberdosis#3188)
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
- Loading branch information