T
TanStack13mo ago
sunny-green

Sharing data between routes using tanstack-router file based routing with generated routes

I'm trying to figure out how to share a react context between two nested routes /users /users/$id I want them to share the same context. I've tried with adding an Outlet in the /users/index.tsx adding a __root in /users/_root.tsx My file structure is like this - /users - index.tsx - /$id - index.tsx
1 Reply
conscious-sapphire
conscious-sapphire13mo ago
please provide a minimal complete example by forking on of the existing examples on stackblitz

Did you find this page helpful?