MCPcopy
hub / github.com/facebook/react / forceUpdate

Function forceUpdate

packages/react-devtools-shared/src/backend/legacy/utils.js:39–48  ·  view source on GitHub ↗
(instance: InternalInstance)

Source from the content-addressed store, hash-verified

37
38// $FlowFixMe[missing-this-annot] webpack config needs to be updated to allow `this` type annotations
39export function forceUpdate(instance: InternalInstance): void {
40 if (typeof instance.forceUpdate === 'function') {
41 instance.forceUpdate();
42 } else if (
43 instance.updater != null &&
44 typeof instance.updater.enqueueForceUpdate === 'function'
45 ) {
46 instance.updater.enqueueForceUpdate(this, () => {}, 'forceUpdate');
47 }
48}

Callers 8

deletePathFunction · 0.90
renamePathFunction · 0.90
overrideValueAtPathFunction · 0.90
handleStoreChangeFunction · 0.85
ChildFunction · 0.85

Calls

no outgoing calls

Tested by 1

ChildFunction · 0.68