Can segments have further directory inside? #662
-
Greetings. I wonder if for instance, one of example in documentation kinomore-v2 has one more directory like I'm not sure FSD is strictly avoid has directory depth more than 3 (layer, slice, segments). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi. Segments can absolutely have folders inside, FSD doesn't regulate that. You can have half of your project in one segment, it's fine. FSD does have recommendations for folders like |
Beta Was this translation helpful? Give feedback.
Hi. Segments can absolutely have folders inside, FSD doesn't regulate that. You can have half of your project in one segment, it's fine.
FSD does have recommendations for folders like
shared/lib
— resist the urge to make folders with names likeutils
,hooks
. Those names might describe what's inside but they don't help you to navigate your code — you still have to search through every file. Alternatively, names likedates
,i18n
are good for folders inshared/lib
, because if you're not looking for dates or i18n code, you can skip searching in these folders entirely.