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
I was going through the React documentation and came across useSyncExternalStore (still learning!). The example usage reminded me of useNetwork in this library.
I'm curious if there would be any performance implications, either minor or significant, if useSyncExternalStore were used to implement useNetwork or other hooks when subscribing to browser APIs? Are there any trade-offs we should consider?
Just wanted to start a discussion and see if this could be a potential improvement or if there are reasons it might not be suitable here.
This discussion was converted from issue #129 on August 12, 2025 07:47.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I was going through the React documentation and came across
useSyncExternalStore
(still learning!). The example usage reminded me ofuseNetwork
in this library.I'm curious if there would be any performance implications, either minor or significant, if
useSyncExternalStore
were used to implementuseNetwork
or other hooks when subscribing to browser APIs? Are there any trade-offs we should consider?Just wanted to start a discussion and see if this could be a potential improvement or if there are reasons it might not be suitable here.
Beta Was this translation helpful? Give feedback.
All reactions