v6.4.0
✨ Features
Same-tab component sync for storage & cookie hooks — closes #202
Two components bound to the same key in the same tab now stay in sync. The native storage event only fires in other tabs, so previously a header and footer useColorMode (or two useCookie on the same key) never updated each other.
useLocalStorage/useSessionStorage(createStorage): each write re-broadcasts a customwindowevent that sibling instances pick up viauseEventListener; cross-tab sync still rides the nativestorageevent.useCookie: same primitive — cookies fire no native event.refreshCookiestays for changes made outside the hook.useColorMode/useDarkMode: inherit it for free (built oncreateStorage).
Notes:
- Uses a
windowevent (not a module-level registry) so it survives the library being bundled more than once. listenToStorageChangesnow gates the cross-tab listener only; same-tab sync is always on.
🐛 Fixes
useTimeout/useTimeoutFnno longer flashpendingfalse → trueon mount — it seeds the real armed value fromimmediate. Closes #203.
📖 Docs
Corrected the useCookie / useLocalStorage / useSessionStorage sync notes and added clickable two-component live demos (en + zh-Hans + zh-Hant).
Full PR: #204