useTransitionValue()function
useTransitionValue(store: S): S["value"]
| Param | Type | |
|---|---|---|
store | S | The store to read. Its value must not be loading or failed. required |
| Return | |
|---|---|
S["value"] | The store's current value. |
Read a store's value, and re-render inside startTransition() when it changes, so <ViewTransition> boundaries animate.
useStore()usesuseSyncExternalStore(), and React always applies those updates synchronously. A synchronous update never starts a view transition.- This hook copies the value into React state inside
startTransition()instead. - Internal for now: not exported from the
shelving/uibarrel.