TanStackT
TanStack17mo ago
1 reply
popular-magenta

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
Was this page helpful?