https://github.com/storybooks/storybook/issues/4796
Storybook requires a module called emotion which imports createContext from react
When we use preact, this module throws an error because the preact-compat mapping for createContext over to preact for imports from 'react' is not compatible with the new Storybook version
Any chance this will be fixed?
Hey @skaraman, I'm working on a specific @storybook/preact version so we no longer have to patch the storybook runtime with preact-compat. I hope to have it finished in the coming days.
Edit: I opened the pull request with storybook: https://github.com/storybooks/storybook/pull/4912
@BartWaardenburg feel free to drop a message into the preact slack chat if you run into anything or are looking for help!
This issue has been resolved with recent versions of Storybook (I'm using 4.1.4).
FYI, some add-ons do not support Preact like "Add-Info" and must be uninstalled and removed from story.jsx files
Most helpful comment
Hey @skaraman, I'm working on a specific @storybook/preact version so we no longer have to patch the storybook runtime with preact-compat. I hope to have it finished in the coming days.
Edit: I opened the pull request with storybook: https://github.com/storybooks/storybook/pull/4912