SlideShare a Scribd company logo
1 of 14
NGRX
Angular
PresentedBy:
Gaurang Patel
Nirav Karathiya
01
Use of NgRx
02
Elements of NgRx
03
04 How NgRx Works?
05 Example
06 Thank You
State Management In Angular
State Management In Angular
In Angular, each component has its own state, to share the data/state between the
components we normally use @Input and @Output decorators, but when the
application goes bigger, its challenging to maintain the data consistency. So to solve
this problem, NgRx was introduced.
Use of NgRx
Daily website visits
Daily signups
โ€ข Managing global and local state.
โ€ข Isolation of side effects to promote a cleaner component architecture.
โ€ข Integration with the Angular Router.
โ€ข Developer tooling that enhances developer experience when building
many different types of application(Redux-devtools)
Elements of NgRx
NgRx packages are divided into a few main categories
Store
01
Selector
02
Reducers
04
03 05
Actions Effects
Store
NgRx Store provides state management for creating maintainable, explicit
applications through the use of single state and actions in order to express state
changes. In cases where you don't need a global, application-wide solution to
manage state, consider using NgRx ComponentStore which provides a solution
for local state management.
Installation: npm install @ngrx/store--save
Selector
Selectors are pure functions used for obtaining slices of store state. @ngrx/store
provides a few helper functions for optimizing this selection.
When using the createSelector and createFeatureSelector functions @ngrx/store
keeps track of the latest arguments in which your selector function was invoked.
Actions
Actions express unique events that happen in our application. These events range
from application lifecycle events, user interactions, to network requests. Actions
are how the application communicates with NgRx to tell it what to do.
โ€ข Each actions must have different name.
โ€ข dispatch() used to trigger the particular action.
โ€ข Actions help you to understand how events are handled in your application.
Reducers
NgRx also provides a powerful set of reducers, which are functions that specify
how the state should change in response to an action. One of the core concepts in
NGRX is immutability, which means that the state should never be modified
directly.
Reducers in NgRx are responsible for handling transitions from one state to the
next state in your application. Reducer functions handle these transitions by
determining which actions to handle based on the type.
Effects
Effects handle the side effects of each Action. These side effects range from
communicating with an external API via HTTP when a certain Action is dispatched
to dispatching another Action to update another part of the State.
Installation: ng add @ngrx/effects
11
How Ngrx Works ?
https://github.com/niravkarathiya/DynamicForm
https://github.com/niravkarathiya/ShoppingCart
Github repository:
Dynamic Form
Firebase Hosted link: https://dynamic-form-faa62.web.app/
https://shopping-cart-ngrx.web.app/
Shopping Cart
Github repository:
Firebase Hosted link:
If there is missing import statement for store and effect or don't add as per the above
snapshot than facing following issue :
1. data store actions instead of state in dev tool kit
2. effect not called while dispatch the action
Note (runtimeChecks) : This warning is coming because in NgRx < 8, to make store immutable, we need to
use ngrx-store-freeze library. In NGRX 8, you can opt-in to make store immutable without ngrx-store-
freeze [as it is in build now in NgRx 8]. This warning will go away if you opt in-store immutability by
specifying runtimeChecks property in StoreModule.forRoot
Challenges Faced
Thank You
Contact Us:
(+91) 991-308-8360 / +1 (912) 528-5566
inquiry@albiorixtech.com
live:albiorix.tech
For More Information Visit Us At:
www.albiorixtech.com

More Related Content

Similar to ๐€๐ง ๐ˆ๐ง๐ญ๐ž๐ซ๐š๐œ๐ญ๐ข๐ฏ๐ž ๐’๐ž๐ฌ๐ฌ๐ข๐จ๐ง ๐จ๐ง ๐€๐ง๐ ๐ฎ๐ฅ๐š๐ซ ๐๐ ๐‘๐ฑ ๐›๐ฒ ๐€๐ง๐ ๐ฎ๐ฅ๐š๐ซ ๐ƒ๐ž๐ฏ๐ž๐ฅ๐จ๐ฉ๐ฆ๐ž๐ง๐ญ ๐“๐ž๐š๐ฆ

a-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdfa-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdfRobertThorson2
ย 
How To Upgrade The React 18 Release Candidate.pptx
How To Upgrade The React 18 Release Candidate.pptxHow To Upgrade The React 18 Release Candidate.pptx
How To Upgrade The React 18 Release Candidate.pptxBOSC Tech Labs
ย 
Understanding React hooks | Walkingtree Technologies
Understanding React hooks | Walkingtree TechnologiesUnderstanding React hooks | Walkingtree Technologies
Understanding React hooks | Walkingtree TechnologiesWalking Tree Technologies
ย 
React Interview Question & Answers PDF By ScholarHat
React Interview Question & Answers PDF By ScholarHatReact Interview Question & Answers PDF By ScholarHat
React Interview Question & Answers PDF By ScholarHatScholarhat
ย 
FRONTEND BOOTCAMP 4.pptx
FRONTEND BOOTCAMP 4.pptxFRONTEND BOOTCAMP 4.pptx
FRONTEND BOOTCAMP 4.pptxEhtesham46
ย 
Will React Hooks replace Redux?
Will React Hooks replace Redux?Will React Hooks replace Redux?
Will React Hooks replace Redux?Trivikram Kamat
ย 
React-JS.pptx
React-JS.pptxReact-JS.pptx
React-JS.pptxAnmolPandita7
ย 
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...JPLoft Solutions
ย 
Redux workshop
Redux workshopRedux workshop
Redux workshopImran Sayed
ย 
Getting started with react &amp; redux
Getting started with react &amp; reduxGetting started with react &amp; redux
Getting started with react &amp; reduxGirish Talekar
ย 
React 18: New Features & Innovations
React 18: New Features & InnovationsReact 18: New Features & Innovations
React 18: New Features & InnovationsBOSC Tech Labs
ย 
downloads_introduction to redux.pptx
downloads_introduction to redux.pptxdownloads_introduction to redux.pptx
downloads_introduction to redux.pptxNavneetKumar111924
ย 
How to increase the ui performance of apps designed using react
How to increase the ui performance of apps designed using react How to increase the ui performance of apps designed using react
How to increase the ui performance of apps designed using react MoonTechnolabsPvtLtd
ย 
Predictable reactive state management - ngrx
Predictable reactive state management - ngrxPredictable reactive state management - ngrx
Predictable reactive state management - ngrxIlia Idakiev
ย 
Plain react, hooks and/or Redux ?
Plain react, hooks and/or Redux ?Plain react, hooks and/or Redux ?
Plain react, hooks and/or Redux ?Jรถrn Dinkla
ย 
Comparison Between React Vs Angular.pdf
Comparison Between React Vs Angular.pdfComparison Between React Vs Angular.pdf
Comparison Between React Vs Angular.pdfStephieJohn
ย 
Get Started with ReactJS 18 Development Services_ New Features and Updates.pptx
Get Started with ReactJS 18 Development Services_ New Features and Updates.pptxGet Started with ReactJS 18 Development Services_ New Features and Updates.pptx
Get Started with ReactJS 18 Development Services_ New Features and Updates.pptxConcetto Labs
ย 

Similar to ๐€๐ง ๐ˆ๐ง๐ญ๐ž๐ซ๐š๐œ๐ญ๐ข๐ฏ๐ž ๐’๐ž๐ฌ๐ฌ๐ข๐จ๐ง ๐จ๐ง ๐€๐ง๐ ๐ฎ๐ฅ๐š๐ซ ๐๐ ๐‘๐ฑ ๐›๐ฒ ๐€๐ง๐ ๐ฎ๐ฅ๐š๐ซ ๐ƒ๐ž๐ฏ๐ž๐ฅ๐จ๐ฉ๐ฆ๐ž๐ง๐ญ ๐“๐ž๐š๐ฆ (20)

a-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdfa-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
a-detailed-guide-everything-you-need-to-know-about-reactjs.pdf
ย 
How To Upgrade The React 18 Release Candidate.pptx
How To Upgrade The React 18 Release Candidate.pptxHow To Upgrade The React 18 Release Candidate.pptx
How To Upgrade The React 18 Release Candidate.pptx
ย 
Understanding React hooks | Walkingtree Technologies
Understanding React hooks | Walkingtree TechnologiesUnderstanding React hooks | Walkingtree Technologies
Understanding React hooks | Walkingtree Technologies
ย 
React Interview Question & Answers PDF By ScholarHat
React Interview Question & Answers PDF By ScholarHatReact Interview Question & Answers PDF By ScholarHat
React Interview Question & Answers PDF By ScholarHat
ย 
FRONTEND BOOTCAMP 4.pptx
FRONTEND BOOTCAMP 4.pptxFRONTEND BOOTCAMP 4.pptx
FRONTEND BOOTCAMP 4.pptx
ย 
Redux in Angular 2+
Redux in Angular 2+Redux in Angular 2+
Redux in Angular 2+
ย 
Will React Hooks replace Redux?
Will React Hooks replace Redux?Will React Hooks replace Redux?
Will React Hooks replace Redux?
ย 
React-JS.pptx
React-JS.pptxReact-JS.pptx
React-JS.pptx
ย 
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...
ย 
reactJS
reactJSreactJS
reactJS
ย 
Redux workshop
Redux workshopRedux workshop
Redux workshop
ย 
Getting started with react &amp; redux
Getting started with react &amp; reduxGetting started with react &amp; redux
Getting started with react &amp; redux
ย 
React 18: New Features & Innovations
React 18: New Features & InnovationsReact 18: New Features & Innovations
React 18: New Features & Innovations
ย 
downloads_introduction to redux.pptx
downloads_introduction to redux.pptxdownloads_introduction to redux.pptx
downloads_introduction to redux.pptx
ย 
How to increase the ui performance of apps designed using react
How to increase the ui performance of apps designed using react How to increase the ui performance of apps designed using react
How to increase the ui performance of apps designed using react
ย 
Predictable reactive state management - ngrx
Predictable reactive state management - ngrxPredictable reactive state management - ngrx
Predictable reactive state management - ngrx
ย 
React
ReactReact
React
ย 
Plain react, hooks and/or Redux ?
Plain react, hooks and/or Redux ?Plain react, hooks and/or Redux ?
Plain react, hooks and/or Redux ?
ย 
Comparison Between React Vs Angular.pdf
Comparison Between React Vs Angular.pdfComparison Between React Vs Angular.pdf
Comparison Between React Vs Angular.pdf
ย 
Get Started with ReactJS 18 Development Services_ New Features and Updates.pptx
Get Started with ReactJS 18 Development Services_ New Features and Updates.pptxGet Started with ReactJS 18 Development Services_ New Features and Updates.pptx
Get Started with ReactJS 18 Development Services_ New Features and Updates.pptx
ย 

More from Albiorix Technology

JavaScript Frameworks Popularity
JavaScript Frameworks PopularityJavaScript Frameworks Popularity
JavaScript Frameworks PopularityAlbiorix Technology
ย 
Top Mobile App Development Trends For Your Business
Top Mobile App Development Trends For Your BusinessTop Mobile App Development Trends For Your Business
Top Mobile App Development Trends For Your BusinessAlbiorix Technology
ย 
What are the Top Technology Trends For Your Business?
What are the Top Technology Trends For Your Business?What are the Top Technology Trends For Your Business?
What are the Top Technology Trends For Your Business?Albiorix Technology
ย 
What is Web Application Development?
What is Web Application Development?What is Web Application Development?
What is Web Application Development?Albiorix Technology
ย 
Top 11 Mobile App Development Frameworks
Top 11 Mobile App Development FrameworksTop 11 Mobile App Development Frameworks
Top 11 Mobile App Development FrameworksAlbiorix Technology
ย 
What Is A Technology Stack?
What Is A Technology Stack?What Is A Technology Stack?
What Is A Technology Stack?Albiorix Technology
ย 
What is Promise in Angular Development?
What is Promise in Angular Development?What is Promise in Angular Development?
What is Promise in Angular Development?Albiorix Technology
ย 
Difference Between jQuery and Angular
Difference Between jQuery and AngularDifference Between jQuery and Angular
Difference Between jQuery and AngularAlbiorix Technology
ย 
9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To ChooseAlbiorix Technology
ย 
Top 7 JavaScript Data Grid Libraries
Top 7 JavaScript Data Grid LibrariesTop 7 JavaScript Data Grid Libraries
Top 7 JavaScript Data Grid LibrariesAlbiorix Technology
ย 
Top 10 Angular Development Tools For Developers
Top 10 Angular Development Tools For DevelopersTop 10 Angular Development Tools For Developers
Top 10 Angular Development Tools For DevelopersAlbiorix Technology
ย 
Top Software Development Trends For Your Business
Top Software Development Trends For Your BusinessTop Software Development Trends For Your Business
Top Software Development Trends For Your BusinessAlbiorix Technology
ย 
Why Software Maintenance is Essential for Business?
Why Software Maintenance is Essential for Business?Why Software Maintenance is Essential for Business?
Why Software Maintenance is Essential for Business?Albiorix Technology
ย 
Guide to Vite JS โ€“ Modern Fron-End Development Tool
Guide to Vite JS โ€“ Modern Fron-End Development ToolGuide to Vite JS โ€“ Modern Fron-End Development Tool
Guide to Vite JS โ€“ Modern Fron-End Development ToolAlbiorix Technology
ย 
Top 10 Digital Transformation Trends For Business
Top 10 Digital Transformation Trends For BusinessTop 10 Digital Transformation Trends For Business
Top 10 Digital Transformation Trends For BusinessAlbiorix Technology
ย 
Angular Best Practices To Build Clean and Performant Web Applications
Angular Best Practices To Build Clean and Performant Web ApplicationsAngular Best Practices To Build Clean and Performant Web Applications
Angular Best Practices To Build Clean and Performant Web ApplicationsAlbiorix Technology
ย 
Angular Promise vs Observable
Angular Promise vs ObservableAngular Promise vs Observable
Angular Promise vs ObservableAlbiorix Technology
ย 

More from Albiorix Technology (20)

JavaScript Frameworks Popularity
JavaScript Frameworks PopularityJavaScript Frameworks Popularity
JavaScript Frameworks Popularity
ย 
Top Mobile App Development Trends For Your Business
Top Mobile App Development Trends For Your BusinessTop Mobile App Development Trends For Your Business
Top Mobile App Development Trends For Your Business
ย 
What are the Top Technology Trends For Your Business?
What are the Top Technology Trends For Your Business?What are the Top Technology Trends For Your Business?
What are the Top Technology Trends For Your Business?
ย 
What is Web Application Development?
What is Web Application Development?What is Web Application Development?
What is Web Application Development?
ย 
What is ReactJS?
What is ReactJS?What is ReactJS?
What is ReactJS?
ย 
Top 11 Mobile App Development Frameworks
Top 11 Mobile App Development FrameworksTop 11 Mobile App Development Frameworks
Top 11 Mobile App Development Frameworks
ย 
What Is A Technology Stack?
What Is A Technology Stack?What Is A Technology Stack?
What Is A Technology Stack?
ย 
What is Promise in Angular Development?
What is Promise in Angular Development?What is Promise in Angular Development?
What is Promise in Angular Development?
ย 
Difference Between jQuery and Angular
Difference Between jQuery and AngularDifference Between jQuery and Angular
Difference Between jQuery and Angular
ย 
9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose
ย 
Angular vs React
Angular vs ReactAngular vs React
Angular vs React
ย 
Top 7 JavaScript Data Grid Libraries
Top 7 JavaScript Data Grid LibrariesTop 7 JavaScript Data Grid Libraries
Top 7 JavaScript Data Grid Libraries
ย 
Top 10 Angular Development Tools For Developers
Top 10 Angular Development Tools For DevelopersTop 10 Angular Development Tools For Developers
Top 10 Angular Development Tools For Developers
ย 
Resolver in Angular
Resolver in AngularResolver in Angular
Resolver in Angular
ย 
Top Software Development Trends For Your Business
Top Software Development Trends For Your BusinessTop Software Development Trends For Your Business
Top Software Development Trends For Your Business
ย 
Why Software Maintenance is Essential for Business?
Why Software Maintenance is Essential for Business?Why Software Maintenance is Essential for Business?
Why Software Maintenance is Essential for Business?
ย 
Guide to Vite JS โ€“ Modern Fron-End Development Tool
Guide to Vite JS โ€“ Modern Fron-End Development ToolGuide to Vite JS โ€“ Modern Fron-End Development Tool
Guide to Vite JS โ€“ Modern Fron-End Development Tool
ย 
Top 10 Digital Transformation Trends For Business
Top 10 Digital Transformation Trends For BusinessTop 10 Digital Transformation Trends For Business
Top 10 Digital Transformation Trends For Business
ย 
Angular Best Practices To Build Clean and Performant Web Applications
Angular Best Practices To Build Clean and Performant Web ApplicationsAngular Best Practices To Build Clean and Performant Web Applications
Angular Best Practices To Build Clean and Performant Web Applications
ย 
Angular Promise vs Observable
Angular Promise vs ObservableAngular Promise vs Observable
Angular Promise vs Observable
ย 

Recently uploaded

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
ย 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
ย 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
ย 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
ย 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
ย 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
ย 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
ย 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
ย 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
ย 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
ย 
Finology Group โ€“ Insurtech Innovation Award 2024
Finology Group โ€“ Insurtech Innovation Award 2024Finology Group โ€“ Insurtech Innovation Award 2024
Finology Group โ€“ Insurtech Innovation Award 2024The Digital Insurer
ย 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
ย 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
ย 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
ย 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
ย 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
ย 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
ย 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
ย 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
ย 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
ย 

Recently uploaded (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
ย 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
ย 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
ย 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
ย 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
ย 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
ย 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
ย 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
ย 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
ย 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
ย 
Finology Group โ€“ Insurtech Innovation Award 2024
Finology Group โ€“ Insurtech Innovation Award 2024Finology Group โ€“ Insurtech Innovation Award 2024
Finology Group โ€“ Insurtech Innovation Award 2024
ย 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
ย 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
ย 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
ย 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
ย 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
ย 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
ย 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
ย 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
ย 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
ย 

๐€๐ง ๐ˆ๐ง๐ญ๐ž๐ซ๐š๐œ๐ญ๐ข๐ฏ๐ž ๐’๐ž๐ฌ๐ฌ๐ข๐จ๐ง ๐จ๐ง ๐€๐ง๐ ๐ฎ๐ฅ๐š๐ซ ๐๐ ๐‘๐ฑ ๐›๐ฒ ๐€๐ง๐ ๐ฎ๐ฅ๐š๐ซ ๐ƒ๐ž๐ฏ๐ž๐ฅ๐จ๐ฉ๐ฆ๐ž๐ง๐ญ ๐“๐ž๐š๐ฆ

  • 2. 01 Use of NgRx 02 Elements of NgRx 03 04 How NgRx Works? 05 Example 06 Thank You State Management In Angular
  • 3. State Management In Angular In Angular, each component has its own state, to share the data/state between the components we normally use @Input and @Output decorators, but when the application goes bigger, its challenging to maintain the data consistency. So to solve this problem, NgRx was introduced.
  • 4. Use of NgRx Daily website visits Daily signups โ€ข Managing global and local state. โ€ข Isolation of side effects to promote a cleaner component architecture. โ€ข Integration with the Angular Router. โ€ข Developer tooling that enhances developer experience when building many different types of application(Redux-devtools)
  • 5. Elements of NgRx NgRx packages are divided into a few main categories Store 01 Selector 02 Reducers 04 03 05 Actions Effects
  • 6. Store NgRx Store provides state management for creating maintainable, explicit applications through the use of single state and actions in order to express state changes. In cases where you don't need a global, application-wide solution to manage state, consider using NgRx ComponentStore which provides a solution for local state management. Installation: npm install @ngrx/store--save
  • 7. Selector Selectors are pure functions used for obtaining slices of store state. @ngrx/store provides a few helper functions for optimizing this selection. When using the createSelector and createFeatureSelector functions @ngrx/store keeps track of the latest arguments in which your selector function was invoked.
  • 8. Actions Actions express unique events that happen in our application. These events range from application lifecycle events, user interactions, to network requests. Actions are how the application communicates with NgRx to tell it what to do. โ€ข Each actions must have different name. โ€ข dispatch() used to trigger the particular action. โ€ข Actions help you to understand how events are handled in your application.
  • 9. Reducers NgRx also provides a powerful set of reducers, which are functions that specify how the state should change in response to an action. One of the core concepts in NGRX is immutability, which means that the state should never be modified directly. Reducers in NgRx are responsible for handling transitions from one state to the next state in your application. Reducer functions handle these transitions by determining which actions to handle based on the type.
  • 10. Effects Effects handle the side effects of each Action. These side effects range from communicating with an external API via HTTP when a certain Action is dispatched to dispatching another Action to update another part of the State. Installation: ng add @ngrx/effects
  • 12. https://github.com/niravkarathiya/DynamicForm https://github.com/niravkarathiya/ShoppingCart Github repository: Dynamic Form Firebase Hosted link: https://dynamic-form-faa62.web.app/ https://shopping-cart-ngrx.web.app/ Shopping Cart Github repository: Firebase Hosted link:
  • 13. If there is missing import statement for store and effect or don't add as per the above snapshot than facing following issue : 1. data store actions instead of state in dev tool kit 2. effect not called while dispatch the action Note (runtimeChecks) : This warning is coming because in NgRx < 8, to make store immutable, we need to use ngrx-store-freeze library. In NGRX 8, you can opt-in to make store immutable without ngrx-store- freeze [as it is in build now in NgRx 8]. This warning will go away if you opt in-store immutability by specifying runtimeChecks property in StoreModule.forRoot Challenges Faced
  • 14. Thank You Contact Us: (+91) 991-308-8360 / +1 (912) 528-5566 inquiry@albiorixtech.com live:albiorix.tech For More Information Visit Us At: www.albiorixtech.com