Skip to content

Commit e9ba234

Browse files
committed
fix: example
1 parent 8476dc2 commit e9ba234

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

examples/react/basic-ssr-lite/src/routeConfig.tsx

+10-10
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@ export const routeConfig = createRouteConfig().createChildren((createRoute) => [
1818
path: 'posts',
1919
component: Posts,
2020
errorComponent: () => 'Oh crap!',
21-
// loader: async () => {
22-
// return {
23-
// posts: await fetchPosts(),
24-
// }
25-
// },
21+
loader: async () => {
22+
return {
23+
posts: await fetchPosts(),
24+
}
25+
},
2626
// loader: {...}
2727
}).createChildren((createRoute) => [
2828
createRoute({ path: '/', component: PostsIndex }),
2929
createRoute({
3030
path: ':postId',
3131
component: Post,
32-
// loader: async ({ params: { postId } }) => {
33-
// return {
34-
// post: await fetchPostById(postId),
35-
// }
36-
// },
32+
loader: async ({ params: { postId } }) => {
33+
return {
34+
post: await fetchPostById(postId),
35+
}
36+
},
3737
// loader: {...}
3838
}),
3939
]),

0 commit comments

Comments
 (0)