storybook: Storybook 4 not compatible with react 15

Bug

Expected: Min version of react is set to react >= 15.0.0 , but real minimal version of react set by @emotion/core which need react >= 16.3.0 Using react 15 produce error on loading storybook image

Please specify which version of Storybook and optionally any affected addons that you’re running

Screenshots / Screencast / Code Snippets (Optional)

// @storybook/core/package.json
"dependencies": {
    "@emotion/core": "0.13.0",
},
"peerDependencies": {
    "react": ">=15.0.0",
    "react-dom": ">=15.0.0"
},
// @emotion/core/package.json
"peerDependencies": {
    "react": ">=16.3.0"
},

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 5
  • Comments: 44 (26 by maintainers)

Most upvoted comments

@Frankcarvajal it’s released as alpha in @storybook/react@next. Please check it out! We expect to do a stable release in the next few weeks.

cc @ranyitz @Sujimoshi @caitlin615 @arkadiusm @Buggytheclown @stereodenis

If you’d like to test out the alpha on your projects and let us know if it works for you, that would be really awesome! Just try out @storybook/react@next which should get you the latest alpha.

@ndelangen is there anything else they need to do or will it work out of the box?

As I know webpack doesn’t have such option. So you need two configs

Working that that exactly, will not make it into 4.0.0

But we’ll likely introduce this in some 4.x.y

I am in the process of updating a React 15 application to use Webpack 4 and Babel 7. An upgrade to React 16 is in the horizon, but our app is quite large, and will take quite a long time.

Of the options that @ndelangen posted above, I chose to pin the version of Storybook.

Just a note that I needed to pin to version 4.0.0-alpha.18 to get things to work.