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/BoBoBearDev Sep 14 '25

It is hard to explain. But sometimes you are contributing to a much larger application. The application may import your plugin that only partially touch a subset of the routing rules. The file based system may not be able to do this. I have not actually run into this problem btw, because we go straight to non-file based solution. But just conceptually, file based system is not as flexible, eventually you run into issues.