Architecting Angular Applications with Redux, RxJS, and NgRx by Christoffer Noring

Get full access to Architecting Angular Applications with Redux, RxJS, and NgRx and 60K+ other titles, with a free 10-day trial of O'Reilly.

There are also live events, courses curated by job role, and more.

Single source of truth

The data lives in a single store in Redux and not a multiple store like in Flux. The data is represented by one object tree. This brings about a lot of benefits, such as:

An example of a single store can look like the following:

// principles/store.jsclass Store getState() < return jedis: [ < name: "Yoda", id: 1 >, < name: "Palpatine", id: 2 >, < name: "Darth Vader", id: 3 > ], selectedJedi: < name: "Yoda", id: 1 > >; >>const store = new Store(); . 

Get Architecting Angular Applications with Redux, RxJS, and NgRx now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.