From 365ad9ee742ba934912c86bcd2a47c33230a2b83 Mon Sep 17 00:00:00 2001 From: damon <13767267543@163.com> Date: Thu, 20 Jun 2024 14:36:15 +0800 Subject: [PATCH] Update installation.md --- docs/walkthroughs/installation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/walkthroughs/installation.md b/docs/walkthroughs/installation.md index dbc2aed5..ecdc126e 100644 --- a/docs/walkthroughs/installation.md +++ b/docs/walkthroughs/installation.md @@ -182,7 +182,6 @@ const Editor = () => { // Setup the binding const editor = useMemo(() => { - const sharedType = provider.document.get('content', Y.XmlText); const e = withReact(withYjs(createEditor(), sharedType)); // Ensure editor always has at least 1 valid child @@ -202,6 +201,7 @@ const Editor = () => { { at: [0] } ); }; + return e; }, []); const [value, setValue] = useState([])