MCPcopy Create free account
hub / github.com/uiwjs/react-codemirror / forceUpdate

Function forceUpdate

core/src/useCodeMirror.ts:192–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

190 const isTyping = typingLatch.current && !typingLatch.current.isDone;
191
192 const forceUpdate = () => {
193 if (view && value !== view.state.doc.toString()) {
194 view.dispatch({
195 changes: { from: 0, to: view.state.doc.toString().length, insert: value || '' },
196 annotations: [ExternalChange.of(true)],
197 });
198 }
199 };
200
201 if (!isTyping) {
202 forceUpdate();

Callers 1

useCodeMirrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…