Skip to content

Vizel API / react/src / UseVizelEditorStateOptions

Interface: UseVizelEditorStateOptions<T> ​

Defined in: packages/react/src/_reactivity.ts:170

Options accepted by useVizelEditorState.

Type Parameters ​

Type Parameter
T

Properties ​

editor? ​

ts
readonly optional editor?: Editor | null;

Defined in: packages/react/src/_reactivity.ts:185

Editor instance to subscribe to. Defaults to the editor resolved from the surrounding VizelProvider. A component that already receives the editor as a prop passes it here so the selector subscribes to that exact instance even when no provider wraps the component (for example, a standalone <VizelToolbar editor={...} />).


equalityFn? ​

ts
readonly optional equalityFn?: (a, b) => boolean;

Defined in: packages/react/src/_reactivity.ts:177

Equality predicate the hook applies to consecutive selector results. Object.is is the default; the bundled shallowEqualArray and shallowEqualObject cover the shapes that selectors typically return.

Parameters ​

ParameterType
aT
bT

Returns ​

boolean

Released under the MIT License.