I made a lot of big angular apps using different state libraries and same approach: divided big components by 'common sense', like 'pages' for router and which have some children like grid on left and edit form on right. And each component like this had zero @inputs and use subscriptions directly from store.
But now i starting another app and took a pause to think about it - maybe i make too much components, maybe it has effect on performance?
For example i have level one - router lazy loads module, that module has top level 'holder' component, which has toolbar on top with sub-page links and should have user name and avatar on right corner - with menu for actions like logout.
So what is 'right' way in terms of performance:
- My default way - i make 'user-menu' component and use state selectors right inside it to get name and image.
- Or Make that component 'dumb' and read state in parent component and pass via @Input, but then will be right to pass in from top level, will be tone of inputs...
But maybe it will be faster... At same time this component will be used in only one place - no need to have it at all, but then top level will look bad...
Maybe somebody can advice some docs or articles or maybe link to some open-source angular apps, that have real-world scale, not todo lists like on youtube videos where people typing imports manually in VSCode.