-
-
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
SB5 Theming breaks React 15 compat #6474
Comments
There is another solution which I suggested somewhere else and which seems to have dropped off the map: rearrange This doesn't seem at all hard to do, I had just asked @ndelangen some question about the animation stuff but he hadn't responded. I can take a look at it if we clear that up (that's the file that imports emotion and I'm pretty sure its only needed manager-side) |
Should be fixed in this PR: |
Thanks for the repro branch @shilman ! |
Yowza!! I just released https://github.com/storybooks/storybook/releases/tag/v5.1.0-alpha.40 containing PR #6475 that references this issue. Upgrade today to try it out! Because it's a pre-release you can find it on the Closing this issue. Please re-open if you think there's still more to do. |
I have tried it and still get same error. TypeError: Object(...) is not a function problem is here: (core.browser.esm.js) var EmotionCacheContext = createContext(createCache()); There is problem with two versions of React. I use React 15 and Emotion use React 16. Import |
Im facing the same problem also. Even using the next tag |
@shilman do you know how to reproduce this? |
This issue seems like it hasn't gotten much action lately. Closing, please shout if you're still stuck on this! |
The problem
Currently theming operates in
config.js
which is "preview" code (user code). It requires Emotion, which in turn requires React 16.3+.In
5.0.x
the workaround is to not theme Storybook.This breaks in
5.1.x
, probably due to #6435I've created an example and added it to the repo so we can discuss around it, and also to make sure we don't inadvertently break back-compat in the future. Coming in a PR shortly.
The solution
Allow users to configure the manager separately from the preview, as relates to #4796 #4995
create
into its own fileThe text was updated successfully, but these errors were encountered: