File tree Expand file tree Collapse file tree 3 files changed +1
-21
lines changed
examples/react/start-basic/src Expand file tree Collapse file tree 3 files changed +1
-21
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
- import {
2
- createSerializationAdapter ,
3
- createRouter as createTanStackRouter ,
4
- } from '@tanstack/react-router'
1
+ import { createRouter as createTanStackRouter } from '@tanstack/react-router'
5
2
import { routeTree } from './routeTree.gen'
6
3
import { DefaultCatchBoundary } from './components/DefaultCatchBoundary'
7
4
import { NotFound } from './components/NotFound'
8
- import { Foo } from './foo'
9
5
10
6
export function createRouter ( ) {
11
7
const router = createTanStackRouter ( {
@@ -14,15 +10,6 @@ export function createRouter() {
14
10
defaultErrorComponent : DefaultCatchBoundary ,
15
11
defaultNotFoundComponent : ( ) => < NotFound /> ,
16
12
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
- ] ,
26
13
} )
27
14
28
15
return router
Original file line number Diff line number Diff line change 1
1
import { createFileRoute } from '@tanstack/react-router'
2
- import { Foo } from '~/foo'
3
2
4
3
export const Route = createFileRoute ( '/' ) ( {
5
- loader : ( ) => new Foo ( 'xyz' ) ,
6
4
component : Home ,
7
5
} )
8
6
You can’t perform that action at this time.
0 commit comments