MCPcopy Index your code
hub / github.com/react/react / overrideState

Function overrideState

packages/react-devtools-shared/src/__tests__/editing-test.js:463–473  ·  view source on GitHub ↗
(path, value)

Source from the content-addressed store, hash-verified

461 await mountTestApp();
462
463 function overrideState(path, value) {
464 const rendererID = utils.getRendererID();
465 bridge.send('overrideValueAtPath', {
466 id,
467 path,
468 rendererID,
469 type: 'state',
470 value,
471 });
472 flushPendingUpdates();
473 }
474
475 overrideState(['shallow'], 'updated');
476 expect(committedState).toStrictEqual({

Callers 1

editing-test.jsFile · 0.70

Calls 1

flushPendingUpdatesFunction · 0.70

Tested by

no test coverage detected