StoreController
Defined in: packages/core/src/state/types.ts:14
The seam through which a component’s state lives in a store it doesn’t own: any store — Zustand,
an anywidget model, a hand-rolled event emitter — can back a *Store prop by implementing these
three functions. createControllableStore makes a standalone one.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |
Properties
Section titled “Properties”| Property | Type | Description |
|---|---|---|
getValue |
() => T |
Read the current value synchronously. |
setValue |
SetValue<T> |
Write a new value, or derive one from the previous value. |
subscribe |
(listener) => () => void |
Subscribe to changes; call the returned function to unsubscribe. |