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
React 18 has been released including the new concurrent features. When these features are used the useEffect based subscriptions like those used by useSubscribe may "tear" resulting in different parts of the React tree rendering different results.
React 18 includes useSyncExternalStore to allow subscribing to a store's data in a way that does not tear.
The React team has published use-sync-external-store which includes a backwards compatible shim for useSyncExternalStore that works in older versions of React. Additionally it includes a useSyncExternalStoreWithSelector convenience method for when working with selectors.
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.
-
React 18 has been released including the new concurrent features. When these features are used the
useEffect
based subscriptions like those used byuseSubscribe
may "tear" resulting in different parts of the React tree rendering different results.React 18 includes useSyncExternalStore to allow subscribing to a store's data in a way that does not tear.
The React team has published use-sync-external-store which includes a backwards compatible shim for useSyncExternalStore that works in older versions of React. Additionally it includes a
useSyncExternalStoreWithSelector
convenience method for when working with selectors.Beta Was this translation helpful? Give feedback.
All reactions