by pixelready · 2y ago · 0 comments
features
auth
login
libraries
dates
strings
...
I don't like to have a package / library called `utils`, `commons`, `shared` and other generic words that does not indicate me what's the context of this folder.Move your pure function utilities to a feature-agnostic folder whenever it makes sense, and import them into your feature.
I agree that's where the problems begin though :)
feature/shared/utils/foo.ts
feature/shared/utils/format-date.ts
feature/shared/ux/(template|region|etc)/foo.ts
Where ux are for components that may be referenced in multiple areas, or generic templates, etc. and shared are for utility methods, functions, etc.