Closed bastiengrignon closed 1 year ago
Hello, to be honest I don't have much time until at least mid-march, and there is already some work to do in order to support data router. I don't know what needs to be done to support storybook v7 and don't have time to investigate. If you have some insight and/or can make a PR I'm more than willing take a look and merge it.
Ok thanks for the quick response, I completly understand, no problem. I'll look into it if I have a bit of time too :wink:
It's working with the v7. I have those following versions:
"storybook": "^7.0.0-rc.6"
"storybook-addon-react-router-v6": "^0.3.4"
One issue that I have, but not sure if related to Storybook v7 or if it was already there in v6: I cannot update props automatically using the UI if withRouter
is set in the decorators.
I've started to take a look into v7. Indeed the addon is not impacted directly. I will still create a new version for SB7 in order to move away from now deprecated APIs, but also in order to harvest the new typescript support !
I found a problem with a peer dependency on @storybook/components@"^6.4.0":
I get this conflict:
@storybook/components@"^6.4.0" from storybook-addon-react-router-v6@0.3.5
@storybook/components@"^7.0.0" from storybook-react-i18next@2.0.1
I'll publish the new version next Thursday
@bastiengrignon @pellea @ldm-acn Hi, can you try the canary version ?
npm I -D storybook-addon-react-router-v6@1.3.6--canary.ffa6de3.0
yarn add -D storybook-addon-react-router-v6@1.3.6--canary.ffa6de3.0
@JesusTheHun I tried but I got an issue on a story with a NavLink component with the following error : Error: useLocation() may be used only in the context of a <Router> component
@bastiengrignon can you share your story ? This is very likely an issue with your story
@JesusTheHun Yes sorry I forgot to add the withRouter
in my decorators array in the preview.jsx
file :roll_eyes:
I thought that the addon will do it automatically
But now I have another issue when adding the withRouter
globally, some styles are changing in my Story :thinking:
Maybe you should ask on SO ? I don't mind helping but this place is for issues you have identified with the add-on.
Yes no worries just aking I'll check by myself what's goign on ! Thanks for working on supporting storybook 7 :wink:
Support for Storybook 7 has been added with version 1.0.0
It would be nice to be able to use your addon with Storybook 7.
Would you be able to do it or you're going to wait until Storybook 7 will release a stable version ?