I am integrating or sort of rewriting my Angular 1 application with Redux. It has the following architecture:
app1 => App1 running on diff subdomain
app2 => App2 running on diff subdomain
and so on...
shared => Shared modules(with multiple components) b/w app1 and app2
An app is made of multiple modules specific to it.
Shared directory has one or many modules that are shared between two or more apps
So my question is should I have app level store or a module level store.
By app level store and module level store I mean, for example:
SM1
which is shared between two apps.SM1
should use the store of app1
when used inside app1
and should use the store of app2
when used inside app2
. But a module should be a self-sustained entity and it should not rely on any other thing for its store.SM1
could have its own store not sharing with any app. But when the SM1
is used inside app1
will its store conflict with the store of app1
.ngRedux
dependencies which seem kind of redundant.What is the best solution here in terms of a scalable architecture and redux
core principles?
I would go for loose coupling as much as you can: