0.0.2-1 • Published 4 years ago
@stacksoda/react-monaco-editor v0.0.2-1
start
install
yarn add @stacksoda/react-monaco-editor
example
import React from 'react';
import { MonacoEditor } from '@stacksoda/react-monaco-editor';
function App() {
const [editorValue, setEditorValue] = useState([
'const count = 100;',
'',
'function test() {',
' console.log(`count is : ${count}`);',
'}',
'',
'test();'
].join('\n'));
return (
<Editor
width={800}
height={600}
theme="vs"
value={editorValue}
onChange={setEditorValue}
/>
);
}