MCPcopy Index your code
hub / github.com/caseywebdev/react-list / warnIfUpdatesNotWrappedWithActDEV

Function warnIfUpdatesNotWrappedWithActDEV

docs/index.js:34440–34449  ·  view source on GitHub ↗
(fiber)

Source from the content-addressed store, hash-verified

34438 : scheduleCallback$3(priorityLevel, callback);
34439 }
34440 function warnIfUpdatesNotWrappedWithActDEV(fiber) {
34441 isConcurrentActEnvironment() &&
34442 null === ReactSharedInternals.actQueue &&
34443 runWithFiberInDEV(fiber, function () {
34444 console.error(
34445 "An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act",
34446 getComponentNameFromFiber(fiber)
34447 );
34448 });
34449 }
34450 function ensureRootIsScheduled(root) {
34451 root !== lastScheduledRoot &&
34452 null === root.next &&

Callers 1

scheduleUpdateOnFiberFunction · 0.85

Calls 3

runWithFiberInDEVFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…