T
TanStack2mo ago
correct-apricot

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 },
})
}),
],
}
})
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
No description
2 Replies
correct-apricot
correct-apricotOP2mo ago
GitHub
The behavior of types and the actual object for context does not ma...
Which project does this relate to? Start Describe the bug Passing context from fetch and also from requestMiddleware, __root.tsx's beforeLoad and loader has the expected types but when dumping ...
broad-brown
broad-brown2mo ago
yes that's a bug. will be fixed soon

Did you find this page helpful?