-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrading to React 17 on app level breaks UI #12408
Comments
See: fa3a0f1#r42051265 |
@shilman it turned out not to be the actual reason, but is worth fixing anyway |
hey @shilman I may have missed a release, has this been fixed already? Just wondering as im in the process of drawing up a proposal to introduce storybook into our workflow and the docs keep on failing due to this hook violation error. |
@molebox not AFAIK. @Hypnosphi any ideas here? |
Remove react from DLL? |
I'm hoping we can get rid of the DLLs entirely in 6.1. Fingers crossed 🤞 |
@molebox Did you try removing |
Same with 16.14.0 + new JSX transform. |
|
+1, |
What are the odds that I finally get around to trying storybook for the first time at the same time this bug is alive. haha I have impeccable timing. |
Any plans to also increase the react-dom range to support 17? Edit, looks like there are issues with npm 7 + storybook as well. |
See storybookjs/storybook#12408 (comment) for the temporary fix for React Storybook that kept pulling in React 16.
* Adding Firebase Emulator logs to .gitignore * Integrating in LoginView and logging-in behavior * Upgrading everywhere to React 17 See storybookjs/storybook#12408 (comment) for the temporary fix for React Storybook that kept pulling in React 16. * Modifying FirebaseAuthComponent to work when there is no redirect URL. * Changing App test to smoke test that works with routing
Fixed in #12972 / 6.1-beta. Closing.
|
Thanks, @shilman! |
Having this problem as well. I can't upgrade to a nonstable version. Can you backport the fix into 6.0 please? Also I'm on React 16 and |
@thany unfortunately we can't backport it easily. instead we're expediting the 6.1 stable release, due in a week or so. |
Hello, Is this supposed to work ? https://github.com/PrestaShop/prestashop-ui-kit/pull/108/files#diff-0c3746c19bb935bd629052ce8bafe30b5685b04ddf4c879ad49913c31ce59abcR1-R19 I've the same issue while trying to use a useEffect hook inside a mdx story (as I need to execute some JS after a component story is loaded, to make it work properly everytime you'r going to a story through the menu) I was waiting for the version 6.1 to test if it works, but it looks like it doesn't :( Maybe I'm not using it properly |
I was able to get this working on react 17 by turning off the new JSX transform. In the tsconfig - "jsx": "react-jsx",
+ "jsx": "react", And add |
Here's the repro: https://github.com/Hypnosphi/test-storybook-react-17
Error I get is:
Brief debugging showed that
useTheme
imports React from DLL while the rest of manager UI imports it fromnode_modules/@storybook/ui/node_modules/react
The text was updated successfully, but these errors were encountered: