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
feat(react): modernize useSyncExternalStore usage for React 18+ (#1021)
- Drop use-sync-external-store shim; use native useSyncExternalStore
from react and inline the with-selector logic (mirrors React's
reference implementation).
- Remove initializeUseStoreState indirection — no longer needed since
React 18+ is the floor (per peerDependencies).
- Migrate useLocalStore from raw useState/subscribe to useSyncExternalStore
to prevent tearing in concurrent mode.
- Add 'use client' banner to ESM and CJS bundles via Rollup so the
package works correctly in React Server Components environments
(Next.js App Router etc).
- Remove use-sync-external-store from runtime dependencies.
Refs #1004. Deferred React 18/19 primitive work tracked in #1020.
0 commit comments