Table of Contents
Introduction
Course Introduction
Lukas gives reasoning for why this course was created, introduces the audience to several NgRx packages.Course Code Tour
Lukas walks through the course repository, and sets expectations about what will be covered.
NgRx Store
Redux & NgRx Overview
Lukas gives a high-level explanation of what Redux and NgRx attempt to solve in applications.State Shape, Initial State & Reducer
Lukas defines the shape of the state, the initial state, and the reducer in the project module.Combine Reducers
Lukas takes the feature-level reducer that was created in the last section, and combines it with the customers reducer to become a top-level reducerWiring Up the NgRx Store
Lukas pulls the projects out of the component, into the store, selects it, and brings it into the app.Creating Reducers
Lukas creates a switch statement in the project reducer to handle the create, update, and delete methods.Wiring Store to a Component
Lukas rehydrates update, create, and delete in the project component.Redux Devtools
Lukas demonstrates some of the features of the Redux devtools, and explains how they help to map out the state of the application at any given instance.NgRx Q&A
Questions are asked about concerns regarding the size of the state tree, and about initial state.
Actions & Entities
Refactoring Reducers into Actions
Lukas discusses the importance of uniquely named action keys, and refactors the reducers to reflect this.Wiring Actions to a Component
Lukas refactors the project reducers to use the project actions. The generic JavaScript objects are also removed, and made them strongly typed.Entities Using NgRx entity
Lukas redefines the shape of the state. The entity adapter is created, and the initial state is defined.Wiring Entities to the Component
Lukas refactors the way that data is looked up. The project reducer is refactored to use NgRx entity.
Selectors & Side Effects
Basic Store Selectors
Lukas creates low level selectors, then exposes them in the top level selector for consumption.Side Effects & Server Calls
Lukas describes what effects are, and implements them in the application.Effects: Data Persistence
Lukas describes data persistence within effects and wires it up to the application.Effects Debug & Review
Lukas debugs the application, explains why this step was vital, and summarizes the section.Further Refactoring and Q&A
A question is asked regarding how to handle a sequence, and Lukas explains how the application could be further refactored.
Selectors & Facades
Computed Data with Selectors
Lukas explains how to take a selector, and shows how to use combinatory logic to produce a new data structure to meet the needs of the application.Facades
Lukas explains why the Faced pattern can make sense for an application, and implements it in the application.Facade Rationale
Lukas explains use cases and why the Facade pattern may make sense for an application.
Conclusion
Summary
Lukas summarizes what was covered in the course, and introduces reasoning why the different tools might be used.Final Q&A
Lukas fields final questions from students such as how to ensure that the application has the last state when accessing a selector from an effect, whether the store is a sort of cache, clarification on what an Observable is, change detection, testing when using the Facade pattern, and a clarification on the index.ts "barrel roll".