Skip to content

v0.2.0

Choose a tag to compare

@eugenepokalyuk eugenepokalyuk released this 25 Jun 17:00
· 5 commits to main since this release

Added

  • useHydrated — returns false on the server and the first client render, then true after hydration, with no mismatch (built on useSyncExternalStore).
  • useCookieState — useState persisted to document.cookie, with a serverValue option for flash-free SSR, cookie attributes, a custom serializer, and same-tab sync.
  • Documentation pages with live demos for both hooks (English / Русский): https://eugenepokalyuk.github.io/react-stateful-hooks/

Bundle stays tiny (~2.6 kB gzipped, tree-shakeable).

Full changelog: https://github.com/eugenepokalyuk/react-stateful-hooks/blob/main/CHANGELOG.md