TanStackT
TanStack3mo ago
2 replies
skinny-azure

serverContext is empty

i have a very simple setup in src/start.ts:
export const startInstance = createStart(() => {
  return {
    requestMiddleware: [
      createMiddleware().server((ctx) => {
        return ctx.next({
          context: { mobile: true },
        })
      }),
    ],
  }
})


however when i try accessing the serverContext in beforeLoad in my root route, i get an empty object (see attached screenshot), despite the serverContext being correctly typed

is this a bug or am i doing something wrong? p.s. im using solid
image.png
Was this page helpful?