diff --git a/packages/playground/src/react/editor.tsx b/packages/playground/src/react/editor.tsx index cc0d641c7f..ce293c413a 100644 --- a/packages/playground/src/react/editor.tsx +++ b/packages/playground/src/react/editor.tsx @@ -20,6 +20,7 @@ export interface EditorCommand { export const Editor: FunctionComponent = ({ model, options, actions, onMount }) => { const editorContainerRef = useRef(null); const editorRef = useRef(null); + useEffect(() => { editorRef.current = editor.create(editorContainerRef.current!, { model,