Skip to content

Can segments have further directory inside? #662

Closed Answered by illright
dante01yoon asked this question in Q&A
Discussion options

You must be logged in to vote

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 like utils, 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 like dates, i18n are good for folders in shared/lib, because if you're not looking for dates or i18n code, you can skip searching in these folders entirely.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@dante01yoon
Comment options

@illright
Comment options

Answer selected by illright
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants