Skip to content

v6.3.0

Choose a tag to compare

@childrentime childrentime released this 24 Mar 15:26
· 144 commits to main since this release

What's Changed

Refactor

  • createStorage: Replace useState + useDeepCompareEffect with useSyncExternalStore, eliminating CSR first-render flicker, SSR hydration mismatches, and stale cross-tab reads (#195)

Bug Fixes

  • createStorage: Fix stale closure in consecutive functional updates within the same synchronous batch — updateState now reads from getSnapshot() instead of the render-time state

Tests

  • useLocalStorage: Add 12 new test cases covering cross-tab sync, storage.clear(), listenToStorageChanges toggle, three-state semantics, onError, mountStorageValue, and consecutive functional updates

Full Changelog: v6.1.12...v6.3.0