Skip to content

v4.0.0

Compare
Choose a tag to compare
@github-actions github-actions released this 15 Sep 09:05
· 619 commits to master since this release

npm bundle size

v4.0.0-rc.14...v4.0.0

⚠️ 3.0 cannot be upgraded to 4.0+, Migrate from v3 to v4.

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 })
+  ]}
/>