T
TanStack3y ago
continuing-cyan

Global named route object

Hey, is there a way to get the name of routes in a similar fashion like Redwood https://redwoodjs.com/docs/router#link-and-named-route-functions
import { routes } from '@redwoodjs/router'

routes.login() // -> '/login'
import { routes } from '@redwoodjs/router'

routes.login() // -> '/login'
I know the to property exists for earch route like
const loginRoute = new Route({path: '/login'})

loginRoute.to
const loginRoute = new Route({path: '/login'})

loginRoute.to
But I need something global that gives me the string of all available routes
Router | RedwoodJS Docs
About the built-in router for Redwood apps
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?