Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

posts.client.tsx

14 lines524 Bytes

1import { lazy } from '@tanstack/react-router';
2import { routeConfig as parentRouteConfig } from "./__root.client";
3import { useMatch } from '@tanstack/react-router';
4const routeConfig = parentRouteConfig.createRoute({
5 path: "posts",
6 component: lazy(() => import('./posts-component').then(d => ({
7 default: d.component
8 }))),
9 loader: (true as any),
10 errorComponent: lazy(() => import('./posts-errorComponent').then(d => ({
11 default: d.errorComponent
12 })))
13});
14export { routeConfig, routeConfig as postsRoute };