ngrx 4 platform
new features and migration path

by Aliaksei Kuncevic

What is ngrx?

Reactive state management

Why would I need ngrx?

  • Immutable state management
  • Notify components about the state changes
  • Leverage existing redux ecosystem/devtools

ngrx dataflow

Whats new in ngrx 4?

  • Official support for lazy loading
  • Simplified testing
  • Redesigned router integration

Girhub repository

Main components/modules

  • @ngrx/core
  • @ngrx/store
  • @ngrx/effects
yarn add @ngrx/core@1.2.0 @ngrx/store@4.0.3 @ngrx/effects@4.0.5

Upgrade path

  • Angular 4.3+
  • TypeScript 2.4+
  • RxJS 5.4+


*Follow the migration guide

Angular CLI 1.4+

Angular CLI team recommendation

const versionCombos = [
	{ compiler: '>=2.3.1 <3.0.0', typescript: '>=2.0.2 <2.3.0' },
	{ compiler: '>=4.0.0 <5.0.0', typescript: '>=2.1.0 <2.4.0' },
	{ compiler: '>=5.0.0 <6.0.0', typescript: '>=2.4.0 <2.6.0' }
];
angular-cli/issues/7625

Upgrade done!