MCPcopy Index your code
hub / github.com/editablejs/editable / unmount

Function unmount

packages/editor/src/plugin/solt.ts:49–58  ·  view source on GitHub ↗
(editor: Editor, component: React.FC)

Source from the content-addressed store, hash-verified

47 },
48
49 unmount(editor: Editor, component: React.FC) {
50 const store = getStore(editor)
51 store.setState(state => {
52 const { components } = state
53 if (!components.some(c => c.component === component)) return state
54 return {
55 components: components.filter(c => c.component !== component),
56 }
57 })
58 },
59
60 update: <T extends SlotComponentProps>(
61 editor: Editor,

Callers

nothing calls this directly

Calls 1

getStoreFunction · 0.70

Tested by

no test coverage detected