A
A
AlexKindGeek2018-07-04 14:30:07
React
AlexKindGeek, 2018-07-04 14:30:07

Why is the content inside the component not updated??

Hello. A very strange situation for me. Connected the react-ckeditor-component library . Now I'm in the main component, rendering it and passing content to it. He renders that content inside his input. When changing the text in the input, the text inside the editor should also change. Only now it changes my props, changes the state, but not the content, despite the fact that the content depends on the state.
Here's an example:
https://codesandbox.io/s/rm41l11lpp
Why is this happening and how can I fix it??
Thanks for answers!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
0
0xD34F, 2018-07-04
@AlexKindGeek

In the description of the component parameters, content only says that it is "default value to be set", and nothing is said that the content of the editor can be updated with it.
What to do? Well, you can update the value manually, like so .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question