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

Function enqueueReplaceState

packages/react-server/src/ReactFizzClassComponent.js:125–134  ·  view source on GitHub ↗
(inst: any, payload: any, callback: null)

Source from the content-addressed store, hash-verified

123 }
124 },
125 enqueueReplaceState(inst: any, payload: any, callback: null) {
126 const internals: InternalInstance = getInstance(inst);
127 internals.replace = true;
128 internals.queue = [payload];
129 if (__DEV__) {
130 if (callback !== undefined && callback !== null) {
131 warnOnInvalidCallback(callback);
132 }
133 }
134 },
135 // $FlowFixMe[missing-local-annot]
136 enqueueForceUpdate(inst: any, callback) {
137 const internals: InternalInstance = getInstance(inst);

Callers

nothing calls this directly

Calls 2

getInstanceFunction · 0.85
warnOnInvalidCallbackFunction · 0.70

Tested by

no test coverage detected