MCPcopy Create free account
hub / github.com/editablejs/editable / useEditableStore

Function useEditableStore

packages/editor/src/hooks/use-editable.tsx:9–18  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7}
8
9export const useEditableStore = () => {
10 const contenxt = React.useContext(EditableStoreContext)
11 if (!contenxt) {
12 throw new Error(
13 `The \`useEditableStore\` hook must be used inside the <EditableProvider> component's context.`,
14 )
15 }
16
17 return contenxt.store
18}
19
20export interface EditableStoreContext {
21 store: UseBoundStore<StoreApi<EditableStore>>

Callers 1

useEditableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…