Docs
Config

Config

Automaticaly generated file by CLI

File containts

PropertyVariable/TypeTypeDescription
routesvariableRouteWithComponent[]Containts all routes from your files
HrefTypetype-----This type represents href type that can be used with Link component

Example

another-react-router.config.ts
// THIS FILE SHOULD NOT BE MODIFIED
// With love by another-react-router developers 💗
import { type RawRoute, getRoutesComponents } from "another-react-router"
 
const rawRoutes: RawRoute[] = [
	{ path: "/", page: import("./src/routes/page.tsx") },
	{ path: "/user/[id]/", page: import("./src/routes/user/[id]/page.tsx") }
]
const routes = await getRoutesComponents(rawRoutes)
 
type HrefType = "/" | `/user/${string}`
 
export { routes, type HrefType }