-
Hi, Loving the library so far. I'm thinking of trying it out in a portion of one of my company's mid-sized and internal enterprise SPAs, and possibly migrating the entire thing over eventually if it works out. I'm struggling to picture what a large directory-based project structure looks like, though. I tend to group by feature, and I can't seem to find a satisfying way to have route and non-route files coexist. Ideally, I'd like to have a
Is there a way to have The I'd prefer not to use the Is the best option to simply not house feature directories within Edit: It seems something like a For now I am using the
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Ultimately I decided to keep my
And I've set up Typescript import aliases to allow statements like |
Beta Was this translation helpful? Give feedback.
-
I'm having the same "issue" and in the end I came to the same conclusion like you to use a separate directory structure for the actual features and keep the routes in another directory but I'm not really happy with this. That way, features are not really self-contained - you always have to also look into the routes directory. I would like to configure it so that only files with Instead of the |
Beta Was this translation helpful? Give feedback.
-
A library may shouldn't limit how people use that... If library developers wants to enforce something, it is okay to enforce by default but please keep a switch -- not every project will be really large that requires such enforce. |
Beta Was this translation helpful? Give feedback.
Ultimately I decided to keep my
/routes
directory flat, and stick with this type of approach, which seems more of the Tanstack Router way:And I've set up Typescript import aliases to allow statements like
import useSomeAccountsHook from '@/accounts'
. This flattened style of organizing by feature is nice. I'm really enjoying this setup as I port more routes over.