- Updated dependencies [
88298fd]:- @anywidget/types@0.3.0
-
Use
React.useSyncExternalStoreforuseModelStatehook implementation (34f01a3)The
React.useSyncExternalStorehook was introduced in React 18 and is designed for external sources of truth, like the anywidgetmodel. It ensures a shared source within the component tree, and consistent behavior during concurrent rendering, avoiding subtle bugs present inuseEffect-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.useStateAPI inuseModelStatehook (34f01a3)Aligns the
useModelStatehook more closely with theReact.useStateAPI by allowing a callback function in the state setter.
- Add generic type parameter to
useModelhook (34f01a3)
- Support React 19 (#763)
- Updated dependencies [
9c10efe9fd44f779fc2a5821c0e6a28ab0f4edad]:- @anywidget/types@0.2.0
- Updated dependencies [
a4b0ec07b2b8937111487108e9b82daf3d9be2df]:- @anywidget/types@0.1.9
-
Add
useExperimentalhook (#524) -
Updated dependencies [
0c629955fee6379234fece8246c297c69f51ee79]:- @anywidget/types@0.1.8
- Updated dependencies [
777fc268ee06fcf13e48a1c00cfdf90c14d786dc]:- @anywidget/types@0.1.7
- Updated dependencies [
9aa8dcc8558e00e33fbe4506b68ae30113df3728]:- @anywidget/types@0.1.6
- Updated dependencies [
6608992b8fe3a9f4eb7ebb2c8c5533febf26f4dd]:- @anywidget/types@0.1.5
- feat: add 'useModel' hook (#200)
- fix: specify "types" field in package.json (#198)