()
| 7 | } |
| 8 | |
| 9 | export 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 | |
| 20 | export interface EditableStoreContext { |
| 21 | store: UseBoundStore<StoreApi<EditableStore>> |
no outgoing calls
no test coverage detected
searching dependent graphs…