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

via-loader.tsx

23 lines546 Bytes

1import { notFound, createFileRoute } from '@tanstack/solid-router'
2​
3export const Route = createFileRoute('/not-found/via-loader')({
4 loader: () => {
5 throw notFound()
6 },
7 component: RouteComponent,
8 notFoundComponent: () => {
9 return (
10 <div data-testid="via-loader-notFound-component">
11 Not Found "/not-found/via-loader"!
12 </div>
13 )
14 },
15})
16​
17function RouteComponent() {
18 return (
19 <div data-testid="via-loader-route-component" data-server={typeof window}>
20 Hello "/not-found/via-loader"!
21 </div>
22 )