You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is similar to #28771 but for isomorphic. We need a make over for
these dispatchers anyway so this is the first step. Also helps flush out
some internals usage that will break anyway.
It flattens the inner mutable objects onto the ReactSharedInternals.
'Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for'+
2386
-
' one of the following reasons:\n'+
2387
-
'1. You might have mismatching versions of React and the renderer (such as React DOM)\n'+
2388
-
'2. You might be breaking the Rules of Hooks\n'+
2389
-
'3. You might have more than one copy of React in the same app\n'+
2390
-
'See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.',
2391
-
);
2392
-
didCatch=true;
2393
-
}
2394
-
// avoid false positive if no error was thrown at all
2395
-
expect(didCatch).toBe(true);
2396
-
2397
-
expect(getterCalls).toBe(1);
2398
-
expect(setterCalls).toHaveLength(2);
2399
-
expect(setterCalls[0]).not.toBe(initial);
2400
-
expect(setterCalls[1]).toBe(initial);
2401
-
});
2402
-
2403
2348
// This test case is based on an open source bug report:
0 commit comments