From 7e0606b40e31568e632fdec01fd34150dd7558ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20P=C3=A9rez?= Date: Tue, 23 Nov 2021 21:59:47 -0300 Subject: [PATCH] Fix hook example --- docs/QuickStart-API-Basics.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/QuickStart-API-Basics.md b/docs/QuickStart-API-Basics.md index b8db3badeb..dd869c0727 100644 --- a/docs/QuickStart-API-Basics.md +++ b/docs/QuickStart-API-Basics.md @@ -56,9 +56,7 @@ this remains efficient due to data persistence across immutable objects. import {Editor, EditorState} from 'draft-js'; const MyInput = () => { - const [editorState, setEditorState] = useState(() => - EditorState.createEmpty(), - ); + const [editorState, setEditorState] = useState(EditorState.createEmpty()); return ; };