angular-redux / example-app

Example using @angular-redux/store, @angular-redux/router, and @angular-redux/form together with the Angular CLI
123 stars 101 forks source link

Show an example of code splitting #15

Open SethDavenport opened 7 years ago

SethDavenport commented 7 years ago

The code is already organized into a lions module and an elephants module. In a larger app, we'd want to code split these such that needed code is only loaded when the relevant app route is activated. Redux introduces some challenges here but they're not insurmountable. How can we:

Ideally we webpack would output code chunks for these routes and load them on the fly.

murraybauer commented 7 years ago

'Factal' state management for code splitting/lazy loaded modules is planned for the next release of ngrx as well. (https://github.com/ngrx/store/issues/379)

SethDavenport commented 7 years ago

We've released fractal state management in 6.4.0. Details here: https://github.com/angular-redux/store/blob/master/articles/fractal-store.md