T
TanStack2w ago
solid-orange

using createIsomorphicFn how can i get router context?

Hello! I'm trying to get the route context using a createIsomorphicFn. Client I injected a window variable and it works fine. But on the server I have not idea how to get it. I can see tanstack core uses a getStartContext(), but it is not exposed, so I have no way of accessing that exported const in there. Is there a way of accessing to the context?? And for the client, is there a better way instead of having to use window? The use case is because the fetch binding of cloudflare I need to distinct the fetch fn, in the client using normal fetch and in the server using cloudflare fetch. Then i inject the auth, locale and currency to headers. And this is why i want to access to the context as that info lives there.
1 Reply
fascinating-indigo
fascinating-indigo2w ago
we can expose the way to retrieve the router instance from anywhere

Did you find this page helpful?