Skip to content

Commit 88e0b0b

Browse files
authoredSep 20, 2021
doc: Update README.md #263
1 parent 8271cbd commit 88e0b0b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -367,16 +367,18 @@ module.exports = removeImports({});
367367
import "@uiw/react-md-editor/markdown-editor.css";
368368
import "@uiw/react-markdown-preview/markdown.css";
369369
import dynamic from "next/dynamic";
370+
import { useState } from "react";
370371

371372
const MDEditor = dynamic(
372373
() => import("@uiw/react-md-editor").then((mod) => mod.default),
373374
{ ssr: false }
374375
);
375376

376377
function HomePage() {
378+
const [value, setValue] = useState("**Hello world!!!**");
377379
return (
378380
<div>
379-
<MDEditor value="**Hello world!!!**" />
381+
<MDEditor value={value} onChange={setValue} />
380382
</div>
381383
);
382384
}

0 commit comments

Comments
 (0)