T
TanStack3d ago
deep-jade

RoutePaths removed

Hi there I’ve been using the solution from: https://github.com/TanStack/router/discussions/1719#discussioncomment-10524796 to provide type safety for my menu items in my sidebar. My current approach looks like this:
export type RoutePath = RoutePaths<RegisteredRouter['routeTree']>

export interface AppMenuItem {
/** Name displayed in the menu/sidebar and in the TopBar for the active page */
menuItemName: string
/** The route the menu link will navigate to (type safe ensured by router) */
route: RoutePath
}
export type RoutePath = RoutePaths<RegisteredRouter['routeTree']>

export interface AppMenuItem {
/** Name displayed in the menu/sidebar and in the TopBar for the active page */
menuItemName: string
/** The route the menu link will navigate to (type safe ensured by router) */
route: RoutePath
}
` But now I’m getting this error:
"@tanstack/react-router" has no exported member named 'RoutePaths'.
Did you mean 'RouteMatch'?ts(2724)
"@tanstack/react-router" has no exported member named 'RoutePaths'.
Did you mean 'RouteMatch'?ts(2724)
What’s the best approach to handle this situation now?
GitHub
How to ensure a pathname variable is part of my routeTree ? · TanS...
I have a use-case where a global component shows a &quot;go back&quot; link. I&#39;d like to configure the target of this go back link per Route. Instead of moving the component from a global layou...
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?