server.ts context declaration merging conflict between react-router and react-start?
Hi - hopefully I understand correctly but I'm trying to pass in a custom context to my
server.ts fetch handler. The docs say to do this https://tanstack.com/start/latest/docs/framework/react/guide/server-entry-point#request-context
The context isn't extended in the handler above...it stays as BaseContext
I noticed that the type used for Register is actually in the @tanstack/react-routerlibrary, so if modify the declare module above to use that instead, I DO get typesafety....but then my server route context is undefined
If I keep the module declaration to react-start, then the context IS defined in the server route, but NOT in the server.ts fetch context. Should I file a bug report for this or is this expected behavior and I just need to make sure my types in server.ts are correct and have autocomplete for all my server routes? Thanks!Server Entry Point | TanStack Start React Docs
Server Entry Point [!NOTE] The server entry point is optional out of the box. If not provided, TanStack Start will automatically handle the server entry point for you using the below as a default. Thi...
2 Replies
optimistic-gold•3w ago
sure please create a bug report
narrow-beigeOP•3w ago
okay cool will do - thanks for confirming