JesusTheHun/storybook-addon-remix-react-router

Support for react-router v7

Closed this issue · 12 comments

React-router v7 has been released so if we want to upgrade some components library that use react-router and storybook we would need a new version of storybook-addon-remix-react-router to integrate react-router v7.
Is it something that is planned ?

The error that we are getting by using the Link component for example :
image

Can you provide a stackblitz ?

Version 3.0.2 allows react router v7. It's supposed to be a non-breaking major so I'm surprised you have any issue.

Here's what id did to migrate to react-router v7 :
I have uninstalled react-router-dom and install react-router v7 and changed imports to Link from react-router-dom to react-router.
But in storybook-addon-remix-react-router the package used is react-router-dom.

Could the root cause be that i have a v7 react-router and a v6 react-router-dom in my node_modules ?
Shouldn't storybook-addon-remix-react-router use react-router instead of react-router-dom now ?

@MartinWeb it's definitely that. I'll need to update the addon to support either one as a peer dependency

Great. Don't hesitate to tell me when you have an RC that i can try before the actual release and i'll give you feedback on it.

@JesusTheHun would you like me to try a pull request for that and to add React 19 as peer dependency as well ?

@MartinWeb it's not as simple as shoving a new version number in the package.json

Can you try npm i storybook-addon-remix-react-router@3.0.3--canary.85.7d8672d.0 ?
It will be a new major version upon release

@JesusTheHun the new canary version fixed the problem on my project.
Thanks a lot 👍
If it's ok for you, you can make a new release.

@JesusTheHun any news on a new release to have this correction ?
Thanks in advance for your reply, and your work on this :)

@MartinWeb this will likely get out Tuesday

@JesusTheHun amazing, thanks for the news.
A nice release on new year's eve 👍

@MartinWeb v4.0.0 is out

Thanks @JesusTheHun, i will try that next monday :)