Skip to content

Commit 9b5c683

Browse files
schiller-manueltannerlinsley
authored andcommitted
clean up example
1 parent 1554d6b commit 9b5c683

File tree

3 files changed

+1
-21
lines changed

3 files changed

+1
-21
lines changed

examples/react/start-basic/src/foo.ts

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/react/start-basic/src/router.tsx

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
import {
2-
createSerializationAdapter,
3-
createRouter as createTanStackRouter,
4-
} from '@tanstack/react-router'
1+
import { createRouter as createTanStackRouter } from '@tanstack/react-router'
52
import { routeTree } from './routeTree.gen'
63
import { DefaultCatchBoundary } from './components/DefaultCatchBoundary'
74
import { NotFound } from './components/NotFound'
8-
import { Foo } from './foo'
95

106
export function createRouter() {
117
const router = createTanStackRouter({
@@ -14,15 +10,6 @@ export function createRouter() {
1410
defaultErrorComponent: DefaultCatchBoundary,
1511
defaultNotFoundComponent: () => <NotFound />,
1612
scrollRestoration: true,
17-
serializationAdapters: [
18-
createSerializationAdapter({
19-
key: 'foo',
20-
test: (value) => value instanceof Foo,
21-
// order of properties matters for typescript inference
22-
toSerializable: (value) => value.bar,
23-
fromSerializable: (value) => new Foo(value),
24-
}),
25-
],
2613
})
2714

2815
return router

examples/react/start-basic/src/routes/index.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import { createFileRoute } from '@tanstack/react-router'
2-
import { Foo } from '~/foo'
32

43
export const Route = createFileRoute('/')({
5-
loader: () => new Foo('xyz'),
64
component: Home,
75
})
86

0 commit comments

Comments
 (0)