Skip to content

Conversation

@pete-murphy
Copy link
Member

@pete-murphy pete-murphy commented May 18, 2023

https://react.dev/reference/react-dom/flushSync

There are numerous disclaimers in the docs

flushSync can significantly hurt performance, and may unexpectedly force pending Suspense boundaries to show their fallback state.
Most of the time, flushSync can be avoided, so use flushSync as a last resort.

Could include those here as well. Despite the warnings I've nonetheless found flushSync to be useful in a few cases 🙂 like working with the View Transitions API

@pete-murphy pete-murphy marked this pull request as ready for review May 20, 2023 16:28
@i-am-the-slime i-am-the-slime merged commit b93b156 into purescript-react:main Jul 11, 2023
@pete-murphy pete-murphy deleted the pm/add-flush-sync branch July 15, 2023 16:37
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.

2 participants