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

Function buildRouter

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

Source from the content-addressed store, hash-verified

32})
33
34async function buildRouter() {
35 const rootRoute = createRootRoute({
36 component: () => null,
37 })
38 const router = createRouter({
39 history: createMemoryHistory({ initialEntries: ['/'] }),
40 routeTree: rootRoute,
41 })
42 router.isServer = true
43 attachRouterServerSsrUtils({ router, manifest: undefined })
44 await router.load()
45 return router
46}
47
48function drainBody(response: Response) {
49 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