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
But you could also adapt your current approach doing it all in one hook, you'd just need to make sure that you aren't returning a new object from getSnapshot every time it gets called.
The text was updated successfully, but these errors were encountered:
Using
useSyncExternalStore()
you can avoid adding a state and an effect inuseMediaQuery()
and on the first render it will be the correct valueBut you could also adapt your current approach doing it all in one hook, you'd just need to make sure that you aren't returning a new object from
getSnapshot
every time it gets called.The text was updated successfully, but these errors were encountered: