We're developing an Angular Living Styleguide at the moment. We plan to develop components in this styleguide and use them in our Apps.
For the apps, we would also like to use the redux pattern: https://github.com/angular-redux/store
Which I could not find is: How to chain components, that are imported via npm packages, to the redux store?
- Should the store be injected as a Service in the component? This goes against decoupling. And what about double components, which would then have the same dispatch message?
- Should the store be given to the compontent via
@Input
? Then other variables like dispatch-strings must also be passed to the Component. (e.g. a button - which action to dispatch when pressed) - Should I implement a service, which handles all the redux stuff, including the component giving the dispatch-message to the service? This seems like re-implementing redux to me.