angular-redux / store

Angular 2+ bindings for Redux
MIT License
1.34k stars 202 forks source link

NgReduxModule.provideStore() #453

Closed RSginer closed 7 years ago

RSginer commented 7 years ago

This is a

What toolchain are you using for transpilation/bundling?

Environment

NodeJS Version: 8.0.0 Typescript Version: 2.3.4 Angular Version: 4.3.2 @angular-redux/store version: 6.5.7 angular/cli version: 1.1.3 OS: Ubuntu

Expected Behaviour:

Provide Store in the module and configure dynamically the RootState and epics like ngrx/effects and like 'ngrx/store' https://github.com/ngrx/store/blob/master/src/ng2.ts#L59

I think its a interesting feature, when you import a module with the NgReduxModule.provideStore() the main module will read this and add it to the RootState

Actual Behaviour:

If you want to add new substore you needs to change the RootStore, add the substore and his reduccer to the RootStore, and add the epics middleware. I want to import a module and all is encapsulated in. This feature will help to make the projects more modulars

RSginer commented 7 years ago

Closed in favor of #416