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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flushSync #53

Merged
merged 1 commit into from
Jul 11, 2023
Merged

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
1 check passed
@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.

None yet

2 participants