angular-architects / nx-ddd-plugin

Nx plugin for structuring a monorepo with domains and layers
313 stars 56 forks source link

[Question] Which approach should I use to create a ui-module (dumb components)? #52

Closed wizardnet972 closed 3 years ago

wizardnet972 commented 3 years ago

Which approach is better to create a ui-module (dumb components)?

Create ui-module-s per feature-

auth:
 feature-login
 ui-login-form

 feature-register
 ui-register-form

 shared
   social-links

OR create one ui-module (ui-auth) and inside all create all components for all features?

auth:
  feature-login
  feature-register
  ui-auth:
    lib/src/components/login-form
    lib/src/components/register-form
    lib/src/components/social-links
manfredsteyer commented 3 years ago

Perhaps, it's best to start with one lib. If the lib grows to big, you can split it into several. E. g. if it has (far) more than 7+/- components.