v4.0.0-rc.4
github-actions
released this
06 Sep 18:41
·
676 commits
to master
since this release
⚠️ 3.0 cannot be upgraded to 4.0+
import CodeMirror from '@uiw/react-codemirror';
- import 'codemirror/mode/javascript/javascript';
+ import { javascript } from "@codemirror/lang-javascript";
const code = 'console.log("hello world!");';
<CodeMirror
value={code}
- options={{
- mode: 'js',
- }}
+ extensions={[
+ javascript({ jsx: true })
+ ]}
/>
npm i @uiw/[email protected]