MCPcopy
hub / github.com/react/react / update

Function update

packages/react-reconciler/src/__tests__/ReactHooks-test.internal.js:477–482  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

475 expect(root).toMatchRenderedOutput('0');
476
477 const update = value => {
478 setCounter(previous => {
479 Scheduler.log(`Compute state (${previous} -> ${value})`);
480 return value;
481 });
482 };
483 ReactTestRenderer.unstable_batchedUpdates(() => {
484 update(0);
485 update(0);

Callers 1

Calls 1

computeFunction · 0.70

Tested by

no test coverage detected