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
** Disclaimer** This information might be inaccurate, due to it being generated automatically
This is a known issue with React 19's strict mode and act() warnings. To resolve: 1. Add the following to your .storybook/preview.ts: ts export const parameters = { reactOptions: { legacyRootApi: false, strictMode: false } }; 2. If you need to keep strict mode enabled, you can alternatively silence these specific warnings by adding: ts const originalError = console.error; console.error = (...args) => { if (/not wrapped in act/.test(args[0])) { return; } originalError.call(console, ...args); }; The root cause is related to React 19's stricter act() requirements during component updates and Storybook's preview iframe navigation.
About Greptile
This response provides a starting point for your research, not a precise solution.
Help us improve! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
Found another issue which might be related (can be reproduced in the same StackBlitz):
Click Button component
Click Primary story
On keyboard: arrow down to hightlight Secondary story, then hit Enter
Story does not change and you get following error in console:
An update to Root inside a test was not wrapped in act(...).
When testing, code that causes React state updates should be wrapped into act(...):
act(() => {
/* fire events that update state */
});
/* assert on the output */
This 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
Describe the bug
When switching between component docs pages you get bunch of
and occasionally
errors in browser console.
Reproduction link
https://stackblitz.com/edit/github-qczcaoih?file=package.json&preset=node
Reproduction steps
System
Additional context
React version: 19
Brower: Chrome, Firefox
The text was updated successfully, but these errors were encountered: