Storybook with Tanstack Router
I'm on a project using turborepo with vite react app using tanstack router and a ui package using storybook. I was tasked with creating navigation for the app. I wanted create a component with a story in the ui package and the following occured:
I was wondering the best way to use Link in storybook.
I was wondering if the best approach is to put tanstack router in the root directory and share the router with the app and package.
After a team discussion I was outnumbered 4 to 1 telling me the router should not be used in stories ever and the package should not be in the root.
I've worked on multiple projects that used different techniques to integrate a different routers. My colleagues seem to have never used storybook before and have created a questionable configuration 'mess'.
Any thoughts and or advise would be appreciated.
I've seen solutions like this for other routers:
https://storybook.js.org/addons/tag/react-router
I'm not sure how to approach the situation.
Storybook
React-router tag | Storybook integrations
Integrations enable advanced functionality and unlock new workflows. Contributed by core maintainers and the amazing developer community.
0 Replies