r/reactjs • • Sep 14 '25

Discussion File-based routing vs code-based routing in TanStack router, which one do you use and why?

[deleted] — view deleted post

35 Upvotes

33 comments sorted by

View all comments

Show parent comment

2

u/wbdvlpr Sep 14 '25

Why don’t you move the file one level up and rename it? So instead of routes/users/route.tsx you would have routes/users.tsx (or routes/users.route.tsx) and keep all the child routes in routes/users/