JesusTheHun / storybook-addon-remix-react-router

Use your app router in your stories. A decorator made for Remix React Router and Storybook
Apache License 2.0
47 stars 11 forks source link

Support for React 18 (SB 6.5) #1

Closed mcharnet closed 2 years ago

mcharnet commented 2 years ago

Storybook 6.5 added support for React 18, but the peerDependencies only supports ^16.8.0 || ^17.0.0. Please update this to include || ^18.0.0.

JesusTheHun commented 2 years ago

I'm creating a sample project to test everything works fine with React 18 & SB 6.5 and I'll update the project.

JesusTheHun commented 2 years ago

Ok, it was not as simple as changing the peerDependencies as React 18 bring some changes. I updated the add-on, tested locally and it worked.

The release has been published. Can you please confirm everything works as expected on your side ?

mcharnet commented 2 years ago

Thanks @JesusTheHun for the quick answer ! I tested it, installation is OK, but got an error on storybook launch :

Module not found: Error: Can't resolve 'react-inspector' in '/Users/marine/dev/teamout/teamout/node_modules/storybook-addon-react-router-v6/dist/esm/components'

Do you have an idea ?

JesusTheHun commented 2 years ago

Alright, I had put react-inspector as a devDep instead of a core dep. react-inspector hasn't migrated to React 18 though, so I had to force the package install using --legacy-peer-deps.

I tested locally with --only=production this time, hopefully that is closer to the reality of installing the package from a remote repository.

I also tested in my sample project with the package from npmjs.com, both start-storybook and build-storybook worked fine.

Can you tell me if you face any issue ?

JesusTheHun commented 2 years ago

I'm closing this, re-open it if it's not fixed for you.