mcut
@mcut/react

useEditorState

Generated TypeScript API reference for the public mcut SDK.

mcut SDK


mcut SDK / react/src / useEditorState

Function: useEditorState()

function useEditorState<TSelected>(selector?, compare?): TSelected;

Defined in: packages/react/src/hooks.ts:21

Subscribe to a slice of editor state (project, selection, history flags).

Type Parameters

TSelected

TSelected = EditorState

Parameters

selector?

(state) => TSelected

compare?

(a, b) => boolean

Returns

TSelected

On this page