(editor: ReactCodeMirrorRef)
| 5 | export function Component() { |
| 6 | let $edit = useRef<ReactCodeMirrorRef | null>(null); |
| 7 | function refCallack(editor: ReactCodeMirrorRef) { |
| 8 | if (!$edit.current && editor?.editor && editor?.state && editor?.view) { |
| 9 | // first time we got ref, similar to useEffect |
| 10 | console.log(editor); // do something with editor |
| 11 | $edit.current = editor; // store it |
| 12 | } |
| 13 | } |
| 14 | return ( |
| 15 | <div> |
| 16 | <CodeMirror |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…