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

_nested-layout.tsx

35 lines762 Bytes

1import { createFileRoute } from '@tanstack/solid-router'
2import { Link, Outlet } from '@tanstack/solid-router'
3​
4export const Route = createFileRoute('/_pathlessLayout/_nested-layout')({
5 component: PathlessLayoutComponent,
6})
7​
8function PathlessLayoutComponent() {
9 return (
10 <div>
11 <div>I'm a nested pathless layout</div>
12 <div class="flex gap-2 border-b">
13 <Link
14 to="/route-a"
15 activeProps={{
16 class: 'font-bold',
17 }}
18 >
19 Go to route A
20 </Link>
21 <Link
22 to="/route-b"
23 activeProps={{
24 class: 'font-bold',
25 }}
26 >
27 Go to route B
28 </Link>
29 </div>
30 <div>
31 <Outlet />
32 </div>
33 </div>
34 )