You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Noticed that internals of this hook use flushSync to force updates, but is there a strong reason for this as opposed to other approaches?
FlushSync use is generally discouraged and dubbed a last resort by the React documentation. It is also known to crash the entire app in certain circumstances due to React internals throwing.
I would be happy to provide a PR getting rid of this if the use case could be explained.
The text was updated successfully, but these errors were encountered:
I apologize for the late reply. I added it in response to this issue, but otherwise had no strong motivation for it. Professionally, I've never had to use flushSync, so I'm not familiar with its caveats/pitfalls. Would be happy to see a PR from you to remove it if you don't think it is necessary anymore!
Noticed that internals of this hook use flushSync to force updates, but is there a strong reason for this as opposed to other approaches?
FlushSync use is generally discouraged and dubbed a last resort by the React documentation. It is also known to crash the entire app in certain circumstances due to React internals throwing.
I would be happy to provide a PR getting rid of this if the use case could be explained.
The text was updated successfully, but these errors were encountered: