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
In useCodeMirror.ts you have an effect which overwrites the document content every time the variable value changes.
I use the react-codemirror component in a project where the content comes from a codemirror extension and not via your prop but the effect still triggers on init and overwrites my initial content.
Prefered solution
I can't provide the content via the prop so it would be nice to disable this effect. Please don't execute the dispatch in the effect if no content (null or undefined) was given.