Avoid echoing remote changes with ExternalChange
masterWhen synchronizing the editor state with an external source (like a remote collaborator), you can prevent the onChange handler from triggering an infinite loop by marking transactions with the ExternalChange annotation.
When useCodeMirror dispatches a change to match the value prop, it automatically attaches the ExternalChange annotation. The internal updateListener checks for this annotation and skips calling the user-provided onChange callback if it is present, ensuring that programmatic updates from the parent don't trigger a feedback loop.