Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Effective Angular

You're reading from   Effective Angular Develop applications of any size by effectively using Angular with Nx, RxJS, NgRx, and Cypress

Arrow left icon
Product type Book
Published in Aug 2024
Publisher Packt
ISBN-13 9781805125532
Pages 400 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Roberto Heckers Roberto Heckers
Author Profile Icon Roberto Heckers
Roberto Heckers
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1:Angular Basics and Setting Up Scalable Nx Workspaces FREE CHAPTER
2. Chapter 1: Scalable Front-End Architecture for Angular Applications 3. Chapter 2: Powerful Angular Features 4. Chapter 3: Enhancing Your Applications with Directives, Pipes, and Animations 5. Chapter 4: Building Forms Like a Pro 6. Part 2:Handling Application State and Writing Cleaner, More Scalable Code
7. Chapter 5: Creating Dynamic Angular Components 8. Chapter 6: Applying Code Conventions and Design Patterns in Angular 9. Chapter 7: Mastering Reactive Programming in Angular 10. Chapter 8: Handling Application State with Grace 11. Part 3:Getting Ready for Production with Automated Tests, Performance, Security, and Accessibility
12. Chapter 9: Enhancing the Performance and Security of Angular Applications 13. Chapter 10: Internationalization, Localization, and Accessibility of Angular Applications 14. Chapter 11: Testing Angular Applications 15. Chapter 12: Deploying Angular Applications 16. Index 17. Other Books You May Enjoy

Handling global application state with NgRx

When working on enterprise software or an application with extensive or complex state management, you should use a battle-tested state management solution that provides true immutability, unidirectional data flow, and good tools to perform side effects and modify the state securely. The best way forward is to use a battle-tested library that focuses on state management.

The most commonly used library for state management within the Angular community is NgRx; it has a huge community and all the tools you might need to handle even the most complex state. NgRx implements the Redux pattern and consists of four main building blocks: actions, reducers, selectors, and effects.

In this section, we will change our custom-made state management solution so that it uses NgRx. We will keep the store file we made in the previous section for reference purposes and build the NgRx state management in new files.

In a production environment, you should...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime