Skip to content

Commit

Permalink
examples: fix streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley committed Jul 29, 2023
1 parent 8949157 commit c266e6a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
5 changes: 0 additions & 5 deletions examples/react/basic-ssr-streaming/src/router.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ import { postIdRoute } from './routes/posts/$postId'
import { createLoaderClient } from './loaderClient'
import React from 'react'

export const routerContext = new RouterContext<{
loaderClient: ReturnType<typeof createLoaderClient>
head: string
}>()

export const routeTree = rootRoute.addChildren([
indexRoute,
postsRoute.addChildren([postsIndexRoute, postIdRoute]),
Expand Down
9 changes: 7 additions & 2 deletions examples/react/basic-ssr-streaming/src/routes/root.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { TanStackRouterDevtools } from '@tanstack/router-devtools'
import * as React from 'react'
import { Link, Outlet } from '@tanstack/router'
import { routerContext } from '../router'
import { Link, Outlet, RouterContext } from '@tanstack/router'
import { DehydrateRouter } from '@tanstack/react-start/client'
import { createLoaderClient } from '../loaderClient'

export const routerContext = new RouterContext<{
loaderClient: ReturnType<typeof createLoaderClient>
head: string
}>()

export const rootRoute = routerContext.createRootRoute({
component: Root,
Expand Down
2 changes: 1 addition & 1 deletion examples/react/basic-ssr/src/routes/root.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TanStackRouterDevtools } from '@tanstack/router-devtools'
import * as React from 'react'
import { Link, Outlet, RootRoute } from '@tanstack/router'
import { Link, Outlet } from '@tanstack/router'
import { DehydrateRouter } from '@tanstack/react-start/client'
import { routerContext } from '../router'

Expand Down

0 comments on commit c266e6a

Please sign in to comment.