Build Redux Style Applications with Angular2, RxJS, and ngrx/store

Angular 2 has many built-in features for working closely with RxJS to help you build fully reactive applications. This course will teach you how to use Angular 2 with RxJS. We will learn how to use the ngrx/store library to manage state in a very clean reactive "Redux style".

This course assumes you've got a working knowledge of Angular 2 and reactive programming with RxJS. If you don't, you might want to watch Angular 2 Fundamentals and this Introduction to Reactive Programming with RxJS. You might also enjoy Step by Step Async Programming with RxJS and this course on Redux by its creator Dan Abramov!

We have Intermediary Angular 2 courses including topics on Dependency Injection, Components, Directives, Forms, Router, and Animating Web Apps

Watch User Created Playlist (16)

This playlist is user created.

pro-course-rss-logo

PRO RSS Feed

Render an Observable with the Async Pipe

Render an Observable Date with the Async and Date Pipes

P

Handle Click Events with Subjects

P

Handle Clicks and Intervals Together with Merge

P

Manage State in RxJS with StartWith and Scan

P

Map Streams to Values to Affect State

P

Use ngrx/store and Reducers for Angular Application State

P

Dispatch Action Types to Reducers

P

Dispatch Action Payloads to Reducers

P

Pass Template Input Values to Reducers

P

Pass Observables into Components with Async Pipe

P

Add a Second Reducer to the Store

P

Use Two Reducers Together

P

Use a Reducer to Change an Object's Property Inside an Array

P

Use a Value from the Store in a Reducer

P

Review of Angular 2, RxJS, and Reducers from ngrx/store

P
angular tutorial about Render an Observable with the Async Pipe

Render an Observable with the Async Pipe

2:19 angular

Angular templates use a special Async pipe to be able to render out Observables. This lesson covers the syntax used to create an Observable in Angular and then to render it out in the template.

https://github.com/johnlindquist/rxjs-in-angular2/tree/11aa4c29a4536dad0ef26b78d8f7f503e4372f74/src

angular tutorial about Render an Observable Date with the Async and  Date Pipes

Render an Observable Date with the Async and Date Pipes

1:05 angular PRO

Instead of simply pushing numbers on a timer into the template, now we'll move on to pushing actual Dates. We'll still use the Async pipe, but we'll also add on the Date pipe with some formatting to display the Date just the way we want it.

angular tutorial about Handle Click Events with Subjects

Handle Click Events with Subjects

1:33 angular PRO

While Angular usually uses event handlers to manage events and RxJS typically uses Observable.fromEvent, a good practice when using Angular and RxJS combined is to use Subjects and push the value through each event so that you can use it as part of your stream.

angular tutorial about Handle Clicks and Intervals Together with Merge

Handle Clicks and Intervals Together with Merge

1:36 angular PRO

Observable.merge allows you take two different source streams and use either one of them to make changes to the same state of your data. This lesson shows how you can use a stream of clicks and an interval stream and use either one to update the clock.

angular tutorial about Manage State in RxJS with StartWith and Scan

Manage State in RxJS with StartWith and Scan

2:23 angular PRO

The scan operator in RxJS is the main key to managing values and states in your stream. Scan behaves just as a reduce function would, but scan is able to collect values from streams over time. This lesson covers using startWith to set the initial accumulator value then using scan to update the value of the clock from the clicks and interval.

angular tutorial about Map Streams to Values to Affect State

Map Streams to Values to Affect State

1:32 angular PRO

While you have multiple streams flowing into your scan operator, you'll need to map each stream to the specific values you need to update your state the way that you want. This lesson covers using the map operator to determine what the click and interval should do when the state is updated.

angular tutorial about Use ngrx/store and Reducers for Angular Application State

Use ngrx/store and Reducers for Angular Application State

5:12 angular PRO

ngrx/store is a library that simplifies common RxJS patterns for managing state and gives you an easy api to use it within your Angular application. This lesson shows how to convert a common startWith and scan stream into an ngrx Store and reducer.

angular tutorial about Dispatch Action Types to Reducers

Dispatch Action Types to Reducers

1:21 angular PRO

A reducer needs to know what you want it to do whenever it's called. You do this by passing along an action type then the reducer can switch based on the type to achieve the logic you need. This lesson covers dispatching action types to your reducer to update the state based on that type.

angular tutorial about Dispatch Action Payloads to Reducers

Dispatch Action Payloads to Reducers

2:00 angular PRO

While action types allow you tell your reducer what action it should take, the payload is the data that your reducer will use to update the state. This lesson shows you how to pass an action payload along with your action type to update the state.

angular tutorial about Pass Template Input Values to Reducers

Pass Template Input Values to Reducers

2:37 angular PRO

Angular allows you to pass values from inputs simply by referencing them in the template and passing them into your Subject.next() call. This lesson shows you how to make a number input and pass the value so you can configure how much you want the clock to change.

angular tutorial about Pass Observables into Components with Async Pipe

Pass Observables into Components with Async Pipe

3:09 angular PRO

The components inside of your container components can easily accept Observables. You simply define your custom @Input then use the Async pipe when you pass the Observable in. This lesson walks you through the process of passing an Observable into a Component.

angular tutorial about Add a Second Reducer to the Store

Add a Second Reducer to the Store

2:33 angular PRO

Stores can accept as many reducers as you need. This lesson covers adding a second reducer that will be used to control an array of people.

angular tutorial about Use Two Reducers Together

Use Two Reducers Together

1:38 angular PRO

Reducers can easily be used inside one another to update related state. This lesson shows how you can use the clock reducer inside of the people reducer to create the time for each new person.

angular tutorial about Use a Reducer to Change an Object's Property Inside an Array

Use a Reducer to Change an Object's Property Inside an Array

5:05 angular PRO

Reducers are also often used for changing a single property inside of other reducers. This lesson shows how a type can enter the people reducer, but then the people reducer can use a different type to call the clock reducer and get a value back.

angular tutorial about Use a Value from the Store in a Reducer

Use a Value from the Store in a Reducer

3:31 angular PRO

RxJS allows you to combine streams in various ways. This lesson shows you how to take a click stream and combine it with a store stream to use a value from the store inside a reducer.

angular tutorial about Review of Angular 2, RxJS, and Reducers from ngrx/store

Review of Angular 2, RxJS, and Reducers from ngrx/store

3:38 angular PRO

This lesson summarizes everything the course has covered and how Angular 2, RxJS, and ngrx/store work together to achive a reactive application.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?