SlideShare une entreprise Scribd logo
1  sur  49
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Redux
Beginner to advanced
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Why Redux
itemList: [ ]
Component-2
Component-1
Component-3
Display
Component
Parent Component
Child Components
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Why Redux
itemList: [ ]
Component-2
Component-1
Component-3
Display
Component
{id: 1}
Parent Component State
Child Components
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Why Redux
itemList: [ {id: 1} ]
Component-2
Component-1
Component-3
Display
Component
Parent Component State
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Why Redux
itemList: [ {id: 1} ]
Component-2
Component-1
Component-3
Display
Component
{id: 2}
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Why Redux
itemList: [ {id: 1} , {id: 2} ]
Component-2
Component-1
Component-3
Display
Component
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Why Redux
Component-2
Component-1
Component-3
Display
Component
{id: 1}
{uid: 3}
{id: 2},itemList: [ {id: 1} , {id: 2} ]
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Why Redux
itemList: [ {id: 1} , {id: 2} , { uid: 3} ]
Component-2
Component-1
Component-3
Display
Component
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Why Redux
Component-2
Component-1
Component-3
Display
Component
{id: 1} {id: 2} , { uid: 3}itemList: [ {id: 1} , {id: 2} , { uid: 3} ]
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Why Redux
Component-2
Component-1
Component-3
Display
Component
itemList: [ {id: 1} , {id: 2} , { uid: 3} ]
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Problems
• Hard to identify component with wrong logic.
• Need rework to see intermediate state of app.
• What if 100s of component updating same complex data.
• Passing data through long chain of nested components.
• Problems due to data mutation takes hours to debug and
then finally you realize the issue and you are like ….
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Redux
Component-2
Component-1
Component-3
Display
Component
Store
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Store
• Store is nothing but simple
javaScript object which
holds application
state/data.
Store State
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
• What is store state.
• Single instance of store will be used throughout
application.
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Redux
Component-2
Component-1
Component-3
Display
Component
Store
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Redux
Component-2
Component-1
Component-3
Display
Component
Store Action1
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Action
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Redux
Component-2
Component-1
Component-3
Display
Component
Store Action1
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Redux
Component-2
Component-1
Component-3
Display
Component
Store's
state-1 Action1
Store's state1
Action1
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Redux
Component-2
Component-1
Component-3
Display
Component
Store
state-1 Action2
Store's state1
Action1
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Redux
Component-2
Component-1
Component-3
Display
Component
Store's
state-2 Action2
Store's state1
Action1
Store's state2
Action2
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Redux
Component-2
Component-1
Component-3
Display
Component
Store's
state-2 Action3
Store's state1
Action1
Store's state2
Action2
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Redux
Component-2
Component-1
Component-3
Display
Component
Store's
state-3 Action3
Store's state1
Action1
Store's state2
Action2
Store's state3
Action3
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Reducer
• Reducer is just a function
which understands action
that components raise or
dispatches.
• It is responsible for taking
out payload/data from
action and appropriately
storing it in redux store.
• You will write actions as
well as reducer
24
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Redux data
flow
25
Credits: Medium.com
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Demo ...
Vanilla Redux
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Any Questions
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
You might not need redux ...
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
React Redux
• Connect api helps application to connect with redux
store.
• It creates wrapper component around our component
• It avoids some grunt work
– like subscribing to store in each component.
– Import store and passing dispatch to every component
– Optimization to avoid unnecessary re-renders when store
changes.
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Demo ...
React Redux
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Connect api code
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Cross Slice Reducer …
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Multiple stores
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Normalized Store
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Normalized Store
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Chrome Plugin
Demo ...
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Replace Reducer
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Replace Reducer
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Hot reloading for faster
development
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Preloaded state
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Most Important, Interesting and
Easy part of Redux.
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Middleware
Credits: tenor.com
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Let's see how middleware works.
Syntax is available on docs as well.
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Component dispatches
action
Middleware 1 Middleware 2 Middleware 3
Reducer
Action
Action Action
Action
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Demo ...
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
Thunk Middleware
Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights

Contenu connexe

Similaire à Redux JavaScript Meetup - Talentica, Saturday, July 6, 2019

How to Avoid Common Mistakes at Scale: AWS Developer Workshop at Web Summit 2018
How to Avoid Common Mistakes at Scale: AWS Developer Workshop at Web Summit 2018How to Avoid Common Mistakes at Scale: AWS Developer Workshop at Web Summit 2018
How to Avoid Common Mistakes at Scale: AWS Developer Workshop at Web Summit 2018Amazon Web Services
 
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...Amazon Web Services
 
Microapps: Redefining Enterprise Mobility
Microapps: Redefining Enterprise MobilityMicroapps: Redefining Enterprise Mobility
Microapps: Redefining Enterprise MobilityNischal Reddy
 
Devoxx - Bug Wars: Episode IV - A New Hope
Devoxx - Bug Wars: Episode IV - A New HopeDevoxx - Bug Wars: Episode IV - A New Hope
Devoxx - Bug Wars: Episode IV - A New HopeMick McGuinness
 
Serverless + Evolutionary Architectures + Safe Deployments = Speed in the Rig...
Serverless + Evolutionary Architectures + Safe Deployments = Speed in the Rig...Serverless + Evolutionary Architectures + Safe Deployments = Speed in the Rig...
Serverless + Evolutionary Architectures + Safe Deployments = Speed in the Rig...Amazon Web Services
 
How Cox Automotive Runs GitHub Enterprise on AWS (ENT356-S) - AWS re:Invent 2018
How Cox Automotive Runs GitHub Enterprise on AWS (ENT356-S) - AWS re:Invent 2018How Cox Automotive Runs GitHub Enterprise on AWS (ENT356-S) - AWS re:Invent 2018
How Cox Automotive Runs GitHub Enterprise on AWS (ENT356-S) - AWS re:Invent 2018Amazon Web Services
 
APIdays Paris 2018 - The State of the API Industry Paolo Malinverno, VP Resea...
APIdays Paris 2018 - The State of the API Industry Paolo Malinverno, VP Resea...APIdays Paris 2018 - The State of the API Industry Paolo Malinverno, VP Resea...
APIdays Paris 2018 - The State of the API Industry Paolo Malinverno, VP Resea...apidays
 
Perth APAC Groundbreakers tour - The Autonomous Database
Perth APAC Groundbreakers tour - The Autonomous DatabasePerth APAC Groundbreakers tour - The Autonomous Database
Perth APAC Groundbreakers tour - The Autonomous DatabaseConnor McDonald
 
Machine Learning Your Eight-Year-Old Would Be Proud Of (AIM390) - AWS re:Inve...
Machine Learning Your Eight-Year-Old Would Be Proud Of (AIM390) - AWS re:Inve...Machine Learning Your Eight-Year-Old Would Be Proud Of (AIM390) - AWS re:Inve...
Machine Learning Your Eight-Year-Old Would Be Proud Of (AIM390) - AWS re:Inve...Amazon Web Services
 
SageMaker로 강화학습(RL) 마스터링 :: 남궁선 - AWS Community Day 2019
SageMaker로 강화학습(RL) 마스터링 :: 남궁선 - AWS Community Day 2019SageMaker로 강화학습(RL) 마스터링 :: 남궁선 - AWS Community Day 2019
SageMaker로 강화학습(RL) 마스터링 :: 남궁선 - AWS Community Day 2019AWSKRUG - AWS한국사용자모임
 
Advanced Serverless Data Processing (GPSWS406) - AWS re:Invent 2018
Advanced Serverless Data Processing (GPSWS406) - AWS re:Invent 2018Advanced Serverless Data Processing (GPSWS406) - AWS re:Invent 2018
Advanced Serverless Data Processing (GPSWS406) - AWS re:Invent 2018Amazon Web Services
 
IoT Microcontrollers and Getting Started with Amazon FreeRTOS (IOT338-R1) - A...
IoT Microcontrollers and Getting Started with Amazon FreeRTOS (IOT338-R1) - A...IoT Microcontrollers and Getting Started with Amazon FreeRTOS (IOT338-R1) - A...
IoT Microcontrollers and Getting Started with Amazon FreeRTOS (IOT338-R1) - A...Amazon Web Services
 
Ensuring Project Success with SpiraTeam and Rapise from Inflectra pta - short
Ensuring Project Success with SpiraTeam and Rapise from Inflectra   pta - shortEnsuring Project Success with SpiraTeam and Rapise from Inflectra   pta - short
Ensuring Project Success with SpiraTeam and Rapise from Inflectra pta - shortAdam Sandman
 
Modern Application Delivery on AWS: the Red Hat Way
Modern Application Delivery on AWS: the Red Hat WayModern Application Delivery on AWS: the Red Hat Way
Modern Application Delivery on AWS: the Red Hat WayAmazon Web Services
 
Managing Connected Devices at Scale with AWS IoT Device Management, ft. Hudl ...
Managing Connected Devices at Scale with AWS IoT Device Management, ft. Hudl ...Managing Connected Devices at Scale with AWS IoT Device Management, ft. Hudl ...
Managing Connected Devices at Scale with AWS IoT Device Management, ft. Hudl ...Amazon Web Services
 
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018Amazon Web Services
 
Websites go Serverless | AWS Floor28
Websites go Serverless | AWS Floor28Websites go Serverless | AWS Floor28
Websites go Serverless | AWS Floor28Amazon Web Services
 
Websites go Serverless - Floor28
Websites go Serverless - Floor28Websites go Serverless - Floor28
Websites go Serverless - Floor28Boaz Ziniman
 
APIに関するセッション資料
APIに関するセッション資料APIに関するセッション資料
APIに関するセッション資料CData Software Japan
 

Similaire à Redux JavaScript Meetup - Talentica, Saturday, July 6, 2019 (20)

React advance
React advanceReact advance
React advance
 
How to Avoid Common Mistakes at Scale: AWS Developer Workshop at Web Summit 2018
How to Avoid Common Mistakes at Scale: AWS Developer Workshop at Web Summit 2018How to Avoid Common Mistakes at Scale: AWS Developer Workshop at Web Summit 2018
How to Avoid Common Mistakes at Scale: AWS Developer Workshop at Web Summit 2018
 
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...
Building Microservices with the Twelve-Factor App Pattern - SRV346 - Chicago ...
 
Microapps: Redefining Enterprise Mobility
Microapps: Redefining Enterprise MobilityMicroapps: Redefining Enterprise Mobility
Microapps: Redefining Enterprise Mobility
 
Devoxx - Bug Wars: Episode IV - A New Hope
Devoxx - Bug Wars: Episode IV - A New HopeDevoxx - Bug Wars: Episode IV - A New Hope
Devoxx - Bug Wars: Episode IV - A New Hope
 
Serverless + Evolutionary Architectures + Safe Deployments = Speed in the Rig...
Serverless + Evolutionary Architectures + Safe Deployments = Speed in the Rig...Serverless + Evolutionary Architectures + Safe Deployments = Speed in the Rig...
Serverless + Evolutionary Architectures + Safe Deployments = Speed in the Rig...
 
How Cox Automotive Runs GitHub Enterprise on AWS (ENT356-S) - AWS re:Invent 2018
How Cox Automotive Runs GitHub Enterprise on AWS (ENT356-S) - AWS re:Invent 2018How Cox Automotive Runs GitHub Enterprise on AWS (ENT356-S) - AWS re:Invent 2018
How Cox Automotive Runs GitHub Enterprise on AWS (ENT356-S) - AWS re:Invent 2018
 
APIdays Paris 2018 - The State of the API Industry Paolo Malinverno, VP Resea...
APIdays Paris 2018 - The State of the API Industry Paolo Malinverno, VP Resea...APIdays Paris 2018 - The State of the API Industry Paolo Malinverno, VP Resea...
APIdays Paris 2018 - The State of the API Industry Paolo Malinverno, VP Resea...
 
Perth APAC Groundbreakers tour - The Autonomous Database
Perth APAC Groundbreakers tour - The Autonomous DatabasePerth APAC Groundbreakers tour - The Autonomous Database
Perth APAC Groundbreakers tour - The Autonomous Database
 
Machine Learning Your Eight-Year-Old Would Be Proud Of (AIM390) - AWS re:Inve...
Machine Learning Your Eight-Year-Old Would Be Proud Of (AIM390) - AWS re:Inve...Machine Learning Your Eight-Year-Old Would Be Proud Of (AIM390) - AWS re:Inve...
Machine Learning Your Eight-Year-Old Would Be Proud Of (AIM390) - AWS re:Inve...
 
SageMaker로 강화학습(RL) 마스터링 :: 남궁선 - AWS Community Day 2019
SageMaker로 강화학습(RL) 마스터링 :: 남궁선 - AWS Community Day 2019SageMaker로 강화학습(RL) 마스터링 :: 남궁선 - AWS Community Day 2019
SageMaker로 강화학습(RL) 마스터링 :: 남궁선 - AWS Community Day 2019
 
Advanced Serverless Data Processing (GPSWS406) - AWS re:Invent 2018
Advanced Serverless Data Processing (GPSWS406) - AWS re:Invent 2018Advanced Serverless Data Processing (GPSWS406) - AWS re:Invent 2018
Advanced Serverless Data Processing (GPSWS406) - AWS re:Invent 2018
 
IoT Microcontrollers and Getting Started with Amazon FreeRTOS (IOT338-R1) - A...
IoT Microcontrollers and Getting Started with Amazon FreeRTOS (IOT338-R1) - A...IoT Microcontrollers and Getting Started with Amazon FreeRTOS (IOT338-R1) - A...
IoT Microcontrollers and Getting Started with Amazon FreeRTOS (IOT338-R1) - A...
 
Ensuring Project Success with SpiraTeam and Rapise from Inflectra pta - short
Ensuring Project Success with SpiraTeam and Rapise from Inflectra   pta - shortEnsuring Project Success with SpiraTeam and Rapise from Inflectra   pta - short
Ensuring Project Success with SpiraTeam and Rapise from Inflectra pta - short
 
Modern Application Delivery on AWS: the Red Hat Way
Modern Application Delivery on AWS: the Red Hat WayModern Application Delivery on AWS: the Red Hat Way
Modern Application Delivery on AWS: the Red Hat Way
 
Managing Connected Devices at Scale with AWS IoT Device Management, ft. Hudl ...
Managing Connected Devices at Scale with AWS IoT Device Management, ft. Hudl ...Managing Connected Devices at Scale with AWS IoT Device Management, ft. Hudl ...
Managing Connected Devices at Scale with AWS IoT Device Management, ft. Hudl ...
 
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
Best Practices for Scalable Monitoring (ENT310-S) - AWS re:Invent 2018
 
Websites go Serverless | AWS Floor28
Websites go Serverless | AWS Floor28Websites go Serverless | AWS Floor28
Websites go Serverless | AWS Floor28
 
Websites go Serverless - Floor28
Websites go Serverless - Floor28Websites go Serverless - Floor28
Websites go Serverless - Floor28
 
APIに関するセッション資料
APIに関するセッション資料APIに関するセッション資料
APIに関するセッション資料
 

Dernier

Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSrknatarajan
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spaintimesproduction05
 

Dernier (20)

Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICSUNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
UNIT-IFLUID PROPERTIES & FLOW CHARACTERISTICS
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Vivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design SpainVivazz, Mieres Social Housing Design Spain
Vivazz, Mieres Social Housing Design Spain
 

Redux JavaScript Meetup - Talentica, Saturday, July 6, 2019

  • 1. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rights Redux Beginner to advanced
  • 2. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Why Redux itemList: [ ] Component-2 Component-1 Component-3 Display Component Parent Component Child Components
  • 3. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Why Redux itemList: [ ] Component-2 Component-1 Component-3 Display Component {id: 1} Parent Component State Child Components
  • 4. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Why Redux itemList: [ {id: 1} ] Component-2 Component-1 Component-3 Display Component Parent Component State
  • 5. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Why Redux itemList: [ {id: 1} ] Component-2 Component-1 Component-3 Display Component {id: 2}
  • 6. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Why Redux itemList: [ {id: 1} , {id: 2} ] Component-2 Component-1 Component-3 Display Component
  • 7. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Why Redux Component-2 Component-1 Component-3 Display Component {id: 1} {uid: 3} {id: 2},itemList: [ {id: 1} , {id: 2} ]
  • 8. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Why Redux itemList: [ {id: 1} , {id: 2} , { uid: 3} ] Component-2 Component-1 Component-3 Display Component
  • 9. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Why Redux Component-2 Component-1 Component-3 Display Component {id: 1} {id: 2} , { uid: 3}itemList: [ {id: 1} , {id: 2} , { uid: 3} ]
  • 10. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Why Redux Component-2 Component-1 Component-3 Display Component itemList: [ {id: 1} , {id: 2} , { uid: 3} ]
  • 11. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Problems • Hard to identify component with wrong logic. • Need rework to see intermediate state of app. • What if 100s of component updating same complex data. • Passing data through long chain of nested components. • Problems due to data mutation takes hours to debug and then finally you realize the issue and you are like ….
  • 12. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Redux Component-2 Component-1 Component-3 Display Component Store
  • 13. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Store • Store is nothing but simple javaScript object which holds application state/data. Store State
  • 14. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights • What is store state. • Single instance of store will be used throughout application.
  • 15. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Redux Component-2 Component-1 Component-3 Display Component Store
  • 16. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Redux Component-2 Component-1 Component-3 Display Component Store Action1
  • 17. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Action
  • 18. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Redux Component-2 Component-1 Component-3 Display Component Store Action1
  • 19. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Redux Component-2 Component-1 Component-3 Display Component Store's state-1 Action1 Store's state1 Action1
  • 20. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Redux Component-2 Component-1 Component-3 Display Component Store state-1 Action2 Store's state1 Action1
  • 21. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Redux Component-2 Component-1 Component-3 Display Component Store's state-2 Action2 Store's state1 Action1 Store's state2 Action2
  • 22. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Redux Component-2 Component-1 Component-3 Display Component Store's state-2 Action3 Store's state1 Action1 Store's state2 Action2
  • 23. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Redux Component-2 Component-1 Component-3 Display Component Store's state-3 Action3 Store's state1 Action1 Store's state2 Action2 Store's state3 Action3
  • 24. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Reducer • Reducer is just a function which understands action that components raise or dispatches. • It is responsible for taking out payload/data from action and appropriately storing it in redux store. • You will write actions as well as reducer 24
  • 25. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Redux data flow 25 Credits: Medium.com
  • 26. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Demo ... Vanilla Redux
  • 27. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Any Questions
  • 28. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights You might not need redux ...
  • 29. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights React Redux • Connect api helps application to connect with redux store. • It creates wrapper component around our component • It avoids some grunt work – like subscribing to store in each component. – Import store and passing dispatch to every component – Optimization to avoid unnecessary re-renders when store changes.
  • 30. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Demo ... React Redux
  • 31. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Connect api code
  • 32. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Cross Slice Reducer …
  • 33. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
  • 34. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Multiple stores
  • 35. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Normalized Store
  • 36. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Normalized Store
  • 37. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Chrome Plugin Demo ...
  • 38. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Replace Reducer
  • 39. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Replace Reducer
  • 40. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Hot reloading for faster development
  • 41. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Preloaded state
  • 42. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights
  • 43. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Most Important, Interesting and Easy part of Redux.
  • 44. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Middleware Credits: tenor.com
  • 45. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Let's see how middleware works. Syntax is available on docs as well.
  • 46. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Component dispatches action Middleware 1 Middleware 2 Middleware 3 Reducer Action Action Action Action
  • 47. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Demo ...
  • 48. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights Thunk Middleware
  • 49. Copyright © 2018 Talentica Software (I) Pvt Ltd. All rightsCopyright © 2018 Talentica Software (I) Pvt Ltd. All rights