Skip to content

Latest commit

 

History

History
95 lines (52 loc) · 3.43 KB

File metadata and controls

95 lines (52 loc) · 3.43 KB

@anywidget/react

0.2.2

Patch Changes

0.2.1

Patch Changes

  • Updated dependencies [88298fd]:
    • @anywidget/types@0.3.0

0.2.0

Minor Changes

  • Use React.useSyncExternalStore for useModelState hook implementation (34f01a3)

    The React.useSyncExternalStore hook was introduced in React 18 and is designed for external sources of truth, like the anywidget model. It ensures a shared source within the component tree, and consistent behavior during concurrent rendering, avoiding subtle bugs present in useEffect-based patterns.

    This is marked as a breaking change to signal the internal shift in behavior, though in practice it should be considered an improvement. Most users should not notice any difference, aside from more consistent updates.

  • Mirror React.useState API in useModelState hook (34f01a3)

    Aligns the useModelState hook more closely with the React.useState API by allowing a callback function in the state setter.

Patch Changes

  • Add generic type parameter to useModel hook (34f01a3)

0.1.0

Minor Changes

  • Support React 19 (#763)

0.0.8

Patch Changes

0.0.7

Patch Changes

0.0.6

Patch Changes

0.0.5

Patch Changes

0.0.4

Patch Changes

0.0.3

Patch Changes

0.0.2

Patch Changes

  • feat: add 'useModel' hook (#200)

0.0.1

Patch Changes

  • fix: specify "types" field in package.json (#198)