AndrewMcLagan AndrewMcLagan - 1 year ago 134
AngularJS Question

Redux with multiple react root nodes

Is it possible to have a single redux store serve multiple react apps ... Or root components on the same page?

Will the same

<Provider />

Answer Source

I don't see why not.

The store can be reused without problem, since it is nothing more than a container that accepts actions and keeps/updates the state. It is not bound to a specific react app or any app for that matter. Your apps should have a dependency on the store, not the other way around.

The react-redux Provider element does nothing more than injecting the store into its child components and while it is a convenient and clean solution to enable access to the store, it is not necessary for your app development at all.

I would just give it a shot, try to implement and see if you hit any specific road blocks.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download