JS

Size: a a a
JS
t
B
B
DS
IN
S
ES
A
import { EditorState } from 'draft-js'
import { Editor } from 'react-draft-wysiwyg'
…
const [editorState, setEditorState] = useState(EditorState.createEmpty())
…
<Editor
editorState={editorState}
onEditorStateChange={setEditorState} />
Warning: Can't call setState on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to this.state directly or define a state = {}; class property with the desired state in the r component.
S
ES
ES
S
Т
import { EditorState } from 'draft-js'
import { Editor } from 'react-draft-wysiwyg'
…
const [editorState, setEditorState] = useState(EditorState.createEmpty())
…
<Editor
editorState={editorState}
onEditorStateChange={setEditorState} />
Warning: Can't call setState on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to this.state directly or define a state = {}; class property with the desired state in the r component.
АЗ
A
S
АЗ
Т