createControllableStore
function createControllableStore<T>(initial): StoreController<T>;Defined in: packages/core/src/state/createExternalStoreAdapter.ts:62
A standalone store for one value, backed by Zustand: pass it as any *Store prop, share it between
components, and read or write it from anywhere. Components use the same kind of store internally
when their state is uncontrolled.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
initial |
T |
Returns
Section titled “Returns”Example
Section titled “Example”const rowOrderStore = createControllableStore<string[]>([]);<MultipleSequenceAlignment msa={msa} rowOrderStore={rowOrderStore} /><DistanceMatrix labels={ids} matrix={distances} rowOrderStore={rowOrderStore} />rowOrderStore.setValue(treeLeafOrder);