Is there a hook to access router context ?
I followed the guide for React Context:
https://tanstack.com/router/latest/docs/framework/react/guide/router-context#router-context
I would like to access the context from a component like this:
But I didn't find a way to do it.
Do you have any solution?
https://tanstack.com/router/latest/docs/framework/react/guide/router-context#router-context
I would like to access the context from a component like this:
But I didn't find a way to do it.
Do you have any solution?
TanStack Router's router context is a very powerful tool that can be used for dependency injection among many other things. Aptly named, the router context is passed through the router and down through each matching route. At each route in the hierarchy, the context can be modified or added to. Here's a few ways you might use the router context...
