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 way to provide ID #34

Closed Venefilyn closed 1 year ago

Venefilyn commented 1 year ago

React Router has an ID tag in both IndexRouteObject and NonIndexRouteObject as you can see here. This provides an easy way of defining routes so allow easier isActive classes for elements outside React Router. It would be great to have this added as well

https://github.com/remix-run/react-router/blob/de5e57b1fc7309617208a6dd2ddcbd68fdca48b4/packages/react-router/lib/context.ts#L22-L40

I'm trying to setup Storybook in our project and that seemed like the easiest way to handle links in the tabs here

https://github.com/packit/dashboard/pull/240 image

JesusTheHun commented 1 year ago

Hello 👋 thank you for opening an issue. That's reasonable and easy to do, I'll add it this week.

JesusTheHun commented 1 year ago

@SpyTec support for route id has been added in version 1.0.2. Can you give it a try and let me know if it fulfil your need ?

JesusTheHun commented 1 year ago

I'm closing this, if you have an issue please re-open it.