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
45 stars 11 forks source link

"No routes matched location" warning when defining reactRouter parameter in a story and triggering a navigation using useNavigate hook #17

Closed majoncas-ue closed 1 year ago

majoncas-ue commented 1 year ago

Hello!

I have a problem when I'm defining "reactRouter" parameter in my story and I call a navigation from that component afterwards. I get navigated to an empty page with "No routes matched location" warning. This doesn't happen if don't define "reactRouter" parameter in my story, it stays on the current page and I see proper action in the Storybook tab "Navigate to: {url: "/promotions/21", path: "/promotions/21", routeParams: Object, searchParams: Object, hash: ""…}". This is probably due to the fact that by defining the router decorator, it only instantiates the current defined route. Is there any workaround?

JesusTheHun commented 1 year ago

Hi, I need the code to better understand and reproduce your issue. What is the current behavior and what is the expected behavior?