Skip to content

@goodnight-dev/react-hooks@0.3.0

Latest

Choose a tag to compare

@github-actions github-actions released this 04 Jul 16:51
Immutable release. Only release title and notes can be modified.

Minor Changes

  • 1e2c3c7: Add useWindowSize, a useSyncExternalStore-backed hook that reads
    the viewport's width and height and stays in sync on resize. Each
    dimension is number | undefinedundefined on the server and until the
    client's first measurement — so consumers can destructure immediately and only
    branch on the unknown state where it matters.

Patch Changes

  • 7b85d35: ThemePreference's members are now readonly, and useTheme
    returns Readonly<ThemePreference>. The returned object was never meant to be
    mutated in place; the types now say so. No runtime behavior changes.