You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a use case where the user can write something in the editor or open a modal and write there. When closing the modal the user should see updated text in the first editor.
Each editing is saved in DB and then the text comes back as a prop.
In the example below I have the state of the editor saved in the parent state.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a use case where the user can write something in the editor or open a modal and write there. When closing the modal the user should see updated text in the first editor.
Each editing is saved in DB and then the text comes back as a prop.
In the example below I have the state of the editor saved in the parent state.
My try with
UpdateEditorStatePlugin
is not working correctly because the focus always goes on the second editor (which makes sense).What should be the correct way to update another editor's state based on changes in DB made by another editor?
https://codesandbox.io/s/shared-state-between-editors-osu4o9
Beta Was this translation helpful? Give feedback.
All reactions