MCPcopy Create free account
hub / github.com/TanStack/router / buildRouter

Function buildRouter

packages/solid-router/tests/renderRouterToStream.test.tsx:52–64  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

50})
51
52async function buildRouter() {
53 const rootRoute = createRootRoute({
54 component: () => null,
55 })
56 const router = createRouter({
57 history: createMemoryHistory({ initialEntries: ['/'] }),
58 routeTree: rootRoute,
59 })
60 router.isServer = true
61 attachRouterServerSsrUtils({ router, manifest: undefined })
62 await router.load()
63 return router
64}
65
66function drainBody(response: Response) {
67 const reader = response.body!.getReader()

Callers 1

Calls 5

createRootRouteFunction · 0.90
createRouterFunction · 0.90
createMemoryHistoryFunction · 0.90
loadMethod · 0.65

Tested by

no test coverage detected