BPB Online LLP
Reactive State for Angular with NgRx
Reactive State for Angular with NgRx
US$ 19.95
The publisher has enabled DRM protection, which means that you need to use the BookFusion iOS, Android or Web app to read this eBook. This eBook cannot be used outside of the BookFusion platform.
Description
Contents
Reviews

Learn how to build a Reactive Application with Ngrx and Angular

Key Features
Learn how to create your own minimalistic Redux implementation.
Get familiar with the working of NgRx Store.
Learn how to handle asynchronous events without breaking Redux paradigm using NgRx Effects.
Learn how to manage router state using NgRx Router Store.
Deal with a list of records using an entity state adapter pattern using NgRx Entity.

Description
This book will help you learn NgRx in and out. We will start by discussing the fundamental ideas that underpin the design for the centralized store and the need for state management in Angular. We will then learn about the Redux paradigm and the three rules it governs. Along the way, we will explore various Redux terminologies in terms of action, dispatcher, and reducer and will then create our minimalistic version of Redux. We will have a dedicated chapter that paves the way for an Angular application in which we will be integrating NgRx throughout the book. We will also work with Redux Devtools, which will be crucial to debugging NgRx. The book also focuses on the creation of the NgRx Store using @ngrx/schematics and hooking it up in the sample Angular application we built previously. Till here, the sample Angular application is purely relying on NgRx to read/write the application state except for the router state. Next, we will leverage the NgRx Router Store to bring the router state under the radar of NgRx as well so that the entire sample Angular application would be using a single source of truth in terms of NgRx for any application data.

Towards the end, we will optimize the list of records using a proven entity state adapter pattern via NgRx Entity to interact with such records at the individual level to be efficient and performant.

What will you learn
Learn the fundamentals of State Management.
Learn how NgRx works under the hood and make your Angular applications truly reactive.
Learn how to handle asynchronous events with NgRx Effects.
Learn how to use record collection using NgRx Entity.
Learn advanced Angular application using Angular/Material/NgRx/RxJS/TypeScript.
Get acquainted with the knowledge to understand any other state management library.

Who this book is for
Beginners, as well as Experienced Angular developers who want to write sustainable Angular applications over time, will benefit from this book. This book is for anyone interested in State Management with NgRx in Angular.

Table of Contents
1 Redux Principles for ROCK solid application state
2 Setting up NgRx in Angular
3 NgRx Store
4 NgRx Effects
5 NgRx Router Store
6 NgRx Entity State

About the Authors
Amit Gharat is a full-stack engineer and open source contributor. He has built many personal projects in AngularJS/Angular and made some of them open source as well, such as directives, SPAs, and chrome extensions. He was fortunate to write AngularJS UI Development and AngularJS Directives in Traction (unpublished) back in 2015 for two of the largest UK based publishers. He has an excessive urge to share his programming experiences in an easy-to-understand language through his blog (http://amitgharat.wordpress.com). When not programming, he enjoys reading science-fiction, watching movies, and playing games on his brand new Playstation 4 Pro. This is his 3rd book.

Your LinkedIn Profile: https://www.linkedin.com/in/amitgharat/

Language
English
ISBN
9789389898248
Cover Page
Title Page
Copyright Page
Dedication Page
About the Author
About the Reviewers
Acknowledgement
Preface
Errata
Table of Contents
1. R.O.C.K. Solid Application State
Structure
Objectives
Application State in Angular
The Three Musketeers of Redux
Single source of truth
Redux selectors
Read-only application state
Redux actions
Redux dispatcher
Mutate State using Pure functions
Object.assign
Redux Reducer
Reactive state
Conclusion
Questions
2. Setting up NgRx in Angular
Structure
Objectives
Sample Angular Application: Bookmarker
Prerequisite
Scaffold Angular application using Angular CLI
Angular application shell
Shared Angular Service: Bookmark
Shared Angular Component: Error Dialog
Shared Angular Class: Util
Shared Angular Pipe: Fuzzy
Create bookmark
List bookmarks
Edit bookmark
Filter bookmarks
Default Route
NgRx Debugging: Redux Devtool
Conclusion
Questions
3. NgRx Store
Structure
Objectives
What is NgRx?
@ngrx/schematics
What is the root store?
Creating a root store
ActionReducerMap
metaReducers
Root NgRx Reducer
Creating your first reducer
Connecting your first reducer
Root NgRx Action
Creating your first action
Connecting your first action
Dispatching your first action
Root NgRx Selector
Creating your first selector
Using your first selector
What is the feature store?
Feature NgRx Reducer
Feature NgRx Action
Feature NgRx Selector
Updating Feature Store
Conclusion
Questions
4. NgRx Effects
Structure
Objectives
What are the side effects?
Installing @ngrx/effects package
What is feature NgRx effects?
Creating Feature NgRx Effects
Expressing the intent with dispatching NgRx Effect
Managing outcome with non-dispatching NgRx Effect
What is root NgRx Effect
Conclusion
Questions
5. NgRx Router Store
Structure
Objectives
Installing @ngrx/router-store package
Overriding Default Router State Serializer
Tapping native actions of Router Store
Managing the loading state with native actions
Show/Hide progress bar based on the loading state
Conclusion
Questions
6. NgRx Entity State
Structure
Objectives
What is Entity State?
Normalisation of State
Entity State Interface
Entity Adapter
Installing @ngrx/entity package
Entity State Interface
Entity Adapter
Replacing empty Entity Collection using .setAll
Reading Entity State using Entity Selectors
Using cached Entity State Collection
Adding/Updating Entities
Sorting Entity State Collection
Conclusion
Questions

Loading...