In my current setup, the main business logic is inside selectors and effects and if a component needs some data it can start an action to query the data then get the data through selectors. I'm not using the data binding to pass anything from component to component except when I use *ngFor
. Is it considered bad practice? Would it be better if I only communicate with the store in the "page components" (which are loaded through the router so they are kind of the page containers)? Will my setup makes testing harder or it's fine? If yes, where should I put my business logic instead?
Try to get a feeling when which is more useful. But as a rule of thumb, if a child has only the scope of displaying data (no business logic), then it shouldn't subscribe itself. Prefer an input in that case.