angular-architects / nx-ddd-plugin

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

[Question] How to import ui component without breaking ddd rules? #57

Closed wizardnet972 closed 3 years ago

wizardnet972 commented 3 years ago

How to import ui component without breaking ddd rules?

I have libs/reports/ui-grid and I want to import it in libs/dashboard/feature-shell.

This library contains a list of cards display list of reports details (the data come from report service inside the domain).

--

How should I do it without breaking the ddd rules?

  1. Export the component from ui-grid and import it in dashabord/feature-shell?
  2. Create inside libs/shared and import the shared in dashabord/feature-shell and get the data from libs/report/api?
  3. export the component in libs/report/api and import it in dashabord/feature-shell?
manfredsteyer commented 3 years ago

Both is fine. Just beware of having a shared folder that grows too big.