Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Latest commit

 

History

History
52 lines (42 loc) · 3.28 KB

README.md

File metadata and controls

52 lines (42 loc) · 3.28 KB

Angular2 state handling example

A simple todo list example that compares the setup and integration of different state handling strategies in angular2:

Every strategy is placed in a separate feature module and covers the same functionality. Presentational components and models are shared using a commons module.

Installation

git clone [email protected]:Indoqa/angular2-ngrx-redux-example.git
cd angular2-ngrx-redux-example
yarn install

Usage

Start dev environment and open http://localhost:4200

npm start

Docs

Notes

  • Actions and Reducers in redux and ngrx are exactly the same (at least in this small example ;) ).
  • Data manipulation using immutable is identical in all three approaches.
  • Observables are used to deliver data to smart components in all three strategies.
  • Templates may bind directly to these observables using | async. Change detection may be optimized.
  • Smart components may do more advanced reactive manipulations (filtering, sorting, slicing,..) before passing data down to render.
  • Redux and Ngrx provide the same dev tools (logging, timetravel, state debugging etc.)
  • See articles below for a vast range of meanings, opinions and hints for choosing the right state.

Further reading