SlideShare a Scribd company logo
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Agenda
❑ What Is Artificial Intelligence ?
❑ What Is Machine Learning ?
❑ Limitations Of Machine Learning
❑ Deep Learning To The Rescue
❑ What Is Deep Learning ?
❑ Deep Learning Applications
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Agenda
Need For Redux
What Is Redux?
Redux Components
Setting Up Components
Data Flow
React With Redux
Demo
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Need For Redux?
Why Redux was needed?
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Need For Redux
As React is just the View, thus to control the Data Flow we use Redux as a Data Flow Architecture
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Need For Redux
✓ In React the data flows through Components
✓ It follows uni-directional data flow i.e data always
flows from parent to child component.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Need For Redux
✓ Child components can’t pass data to its parent
component
✓ The non-parent components can’t communicate
within each other
✓ React doesn't recommend direct component-to-
component communication this way.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Need For Redux
✓ Redux offers a solution of storing all your application
state in one place, called a "store“
✓ Components then "dispatch" state changes to the
store, not directly to other components.
✓ The components that need to be aware of state
changes can "subscribe" to the store
Store
Dispatch
Subscribe
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What Is Redux?
What exactly is Redux?
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
What Is Redux?
Redux one of the hottest libraries for front end development
Redux is a predictable state container for JavaScript apps
Mostly used for applications State Management
Developed by Dan Abramov and Andrew Clark in 2015
It is inspired by Facebook’s Flux and influenced by functional
programming language Elm
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Principles Of Redux
1 Single Store
2 State Is Read-Only
3 Change Using Pure Functions
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Principles Of Redux
1 Single Store
2 State Is Read-only
3 Change Using Pure Functions
With only React Uni-directional Data Flow, direct
communication between components is not allowed
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Principles Of Redux
1 Single Store
2 State Is Read-only
Store
Redux uses Store for storing all the application state
at one place. Components state is stored in the Store
and they receive updates from the store itself.
3 Change Using Pure Functions
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Principles Of Redux
2 State Is Read Only
1 Single Store
3 Change Using Pure Functions
You can change the state only by triggering an
action which is an object describing what happened.
Action: No ACTION
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Principles Of Redux
2 State Is Read Only
You can change the state only by triggering an
action which is an object describing what happened.
Action: switch ON
1 Single Store
3 Change Using Pure Functions
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Pure
Function
Principles Of Redux
3 Change Using Pure Functions
1 Single Store
2 State Is Read Only
Prev StateACTION
New State
Pure functions called Reducers are used to indicate
how the State has been transformed by the Action
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Redux Components
1
2
3
4
Action
Reducer
View
Store
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Redux Components
1
2
3
4
Action
Reducer
View
Store
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Action
Application ACTION Store
Plain JavaScript objects which are payloads of information for the store
Data
DataData
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Action
function addTodo(text) {
return {
type: ADD_TODO,
text
}
}
• Must have type property that indicates the type of ACTION being performed.
• They must be defined as String constant.
• You can add more properties to it.
ACTION
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Action
function addTodo(text) {
return {
type: ADD_TODO,
text
}
}
• Functions which create ACTIONS
• Takes in the message, converts it into system understandable format and returns a formatted
Action Object.
ACTION
ACTION CREATOR
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Redux Components
1
2
3
4
Action
Reducer
View
Store
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Reducer
Reducer
Prev State ACTION
New State
Reducers are pure functions which specify how the applications state changes in response to an ACTION
They do not change the value of the input parameter
Determines what sort of update needs to be done based on the type
of the action, and returns new values
It returns the previous state if no work needs to be done
The root reducer slices up the state based on the State Object Keys
and passes them to their respective specialized reducers
Reducers don’t manipulate the original state passed to them but
make their own copies and then updates them.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
function reducer(state = initialState, action) {
switch (action.type) {
case ADD_TODO:
return Object.assign({}, state,
{ todos: [ ...state.todos,
{
text: action.text,
completed: false
}
]
})
default:
return state
}
}
Reducer
ACTION Prev State
New State
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Reducer
Things you should NEVER do inside a reducer:
Mutate its arguments
Perform side effects like API calls and routing transitions
Call non-pure functions like Date.now() or Math.random()
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Redux Components
1
2
3
4
Action
Reducer
View
Store
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Store
State Tree
Store
Store is an object which brings all the components to work together. It calculates the state changes and
then notifies the root reducer about it.
Application
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Store
import { createStore } from 'redux'
import todoApp from './reducers’
let store = createStore(reducer)
• With Store the data state can be synchronized from the server level to the client layer without
much hassel.
• This makes the development of large applications easier and faster.
Store
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Store Responsibilities
Store
Holding applications state
Allowing access to state via getState()
Allowing the states to be updated via dispatch(action)
Registering listeners via subscribe(listener)
Handles unregistering of listeners via the function returned by subscribe(listener)
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Redux Components
1
2
3
4
Action
Reducer
View
Store
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
View
Displays the data provided by the Store
Store Data View
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
View
• Smart Components are the managers who are in charge of the actions and pass down a function
in via the props to the dumb components.
• Dumb Components provide information to the smart components if any action is required. They
receive them as props and use them as callback.
STATEFUL
<Component/>
STATELESS
<Component/>
STATELESS
<Component/>
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Flow
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Flow
Redux architecture is concentrated on a strict unidirectional data flow
In an application all the data follows the same lifecycle pattern, making the logic of
your app more predictable and easier to understand.
It also encourages data normalization to ensure consistency
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Flow
Reducers
Provider Component
Actions
One Store
Container
(Dumb Component)
Container
(Smart Component)
Re-render when
Store changes
Pass Data As Props
Store
Store
Store
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Setting Up The Components
Get Store Ready Prepare Action Callbacks
Set Up Communication
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Setting Up The Components
Action
Creator
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Setting Up The Components
Reducers
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Setting Up The Components
Views
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Setting Up The Components
Store
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Setting Up The Components
Provider
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Setting Up The Components
Root
Component
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Get Store Ready Prepare Action Callbacks
Set Up Communication
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
1. Get the store ready
Hey store you are Hired. Here is my
Reducer team to help you out.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Get Store Ready Prepare Action Callbacks
Set Up Communication
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
2. Set up the communication between the store and the components
Hey Provider, this
is the store I hired
Ohk..let me set up a
network to keep your
components updated
Great! Let me connect
to get the updates
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Get Store Ready
Prepare Action Callbacks
Set Up Communication
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
3. Prepare the action callbacks
I need to make it
easy for dumb
components to
understand
I should bind the action creator
and the dispatcher so that the
dumb component can just call the
callback
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Flow
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Flow
Name = Maxx
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Flow
1
Type: NAME_UPDATE
Pos: 2
Value:”Maxx”
UID: 101
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Flow
2
1
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Flow
2
3
1
Here is the current
state tree.
Calculate how new
state tree should
look.
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Flow
2
3
1
Here is
your slice 4
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Flow
2
3
1
4
5
Let me just copy the
slice and update it.
Ohk.. Now this how the
slice looks like
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Flow
2
3
1
4
5
6
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Flow
2
3
1
4
5
6
7
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Flow
2
3
1
4
5
6
7
8
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Data Flow
2
3
1
4
5
6
7
8
Here is the new state
tree. Now you can re-
render your component
trees respectively
9
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
React With Redux
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
React With Redux
React bindings are not included in Redux by default so you need to install them explicitly:
npm install --save react-redux
You have to add these dependency along with babel, react and webpack
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Demo
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Demo
▪ We will be creating an simple User List application using Redux with React
Copyright © 2017, edureka and/or its affiliates. All rights reserved.
Popularity

More Related Content

What's hot (20)

React js - The Core Concepts
React js - The Core ConceptsReact js - The Core Concepts
React js - The Core Concepts
Divyang Bhambhani
 
ReactJS
ReactJSReactJS
ReactJS
Ram Murat Sharma
 
Redux workshop
Redux workshopRedux workshop
Redux workshop
Imran Sayed
 
Exploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & BeyondExploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & Beyond
Kaushal Dhruw
 
reactJS
reactJSreactJS
reactJS
Syam Santhosh
 
Let's Redux!
Let's Redux!Let's Redux!
Let's Redux!
Joseph Chiang
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
Knoldus Inc.
 
React js
React jsReact js
React js
Nikhil Karkra
 
Understanding react hooks
Understanding react hooksUnderstanding react hooks
Understanding react hooks
Maulik Shah
 
webpack 101 slides
webpack 101 slideswebpack 101 slides
webpack 101 slides
mattysmith
 
An Introduction to ReactJS
An Introduction to ReactJSAn Introduction to ReactJS
An Introduction to ReactJS
All Things Open
 
React&redux
React&reduxReact&redux
React&redux
Blank Chen
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation
洪 鹏发
 
Understanding redux
Understanding reduxUnderstanding redux
Understanding redux
David Atchley
 
React JS - Introduction
React JS - IntroductionReact JS - Introduction
React JS - Introduction
Sergey Romaneko
 
React js
React jsReact js
React js
Oswald Campesato
 
Spring andspringboot training
Spring andspringboot trainingSpring andspringboot training
Spring andspringboot training
Mallikarjuna G D
 
State Management in Angular/React
State Management in Angular/ReactState Management in Angular/React
State Management in Angular/React
DEV Cafe
 
【Oracle Cloud ウェビナー】WebLogic Serverのご紹介
【Oracle Cloud ウェビナー】WebLogic Serverのご紹介【Oracle Cloud ウェビナー】WebLogic Serverのご紹介
【Oracle Cloud ウェビナー】WebLogic Serverのご紹介
オラクルエンジニア通信
 
ReactJs
ReactJsReactJs
ReactJs
Sahana Banerjee
 
React js - The Core Concepts
React js - The Core ConceptsReact js - The Core Concepts
React js - The Core Concepts
Divyang Bhambhani
 
Exploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & BeyondExploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & Beyond
Kaushal Dhruw
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
Knoldus Inc.
 
Understanding react hooks
Understanding react hooksUnderstanding react hooks
Understanding react hooks
Maulik Shah
 
webpack 101 slides
webpack 101 slideswebpack 101 slides
webpack 101 slides
mattysmith
 
An Introduction to ReactJS
An Introduction to ReactJSAn Introduction to ReactJS
An Introduction to ReactJS
All Things Open
 
[Final] ReactJS presentation
[Final] ReactJS presentation[Final] ReactJS presentation
[Final] ReactJS presentation
洪 鹏发
 
Spring andspringboot training
Spring andspringboot trainingSpring andspringboot training
Spring andspringboot training
Mallikarjuna G D
 
State Management in Angular/React
State Management in Angular/ReactState Management in Angular/React
State Management in Angular/React
DEV Cafe
 
【Oracle Cloud ウェビナー】WebLogic Serverのご紹介
【Oracle Cloud ウェビナー】WebLogic Serverのご紹介【Oracle Cloud ウェビナー】WebLogic Serverのご紹介
【Oracle Cloud ウェビナー】WebLogic Serverのご紹介
オラクルエンジニア通信
 

Similar to React Redux Tutorial | Redux Tutorial for Beginners | React Redux Training | Edureka (20)

ReactJS Tutorial For Beginners | ReactJS Redux Training For Beginners | React...
ReactJS Tutorial For Beginners | ReactJS Redux Training For Beginners | React...ReactJS Tutorial For Beginners | ReactJS Redux Training For Beginners | React...
ReactJS Tutorial For Beginners | ReactJS Redux Training For Beginners | React...
Edureka!
 
React Interview Questions and Answers | React Tutorial | React Redux Online T...
React Interview Questions and Answers | React Tutorial | React Redux Online T...React Interview Questions and Answers | React Tutorial | React Redux Online T...
React Interview Questions and Answers | React Tutorial | React Redux Online T...
Edureka!
 
React Components Lifecycle | React Tutorial for Beginners | ReactJS Training ...
React Components Lifecycle | React Tutorial for Beginners | ReactJS Training ...React Components Lifecycle | React Tutorial for Beginners | ReactJS Training ...
React Components Lifecycle | React Tutorial for Beginners | ReactJS Training ...
Edureka!
 
what is context API and How it works in React.pptx
what is context API and How it works in React.pptxwhat is context API and How it works in React.pptx
what is context API and How it works in React.pptx
BOSC Tech Labs
 
What Is React | ReactJS Tutorial for Beginners | ReactJS Training | Edureka
What Is React | ReactJS Tutorial for Beginners | ReactJS Training | EdurekaWhat Is React | ReactJS Tutorial for Beginners | ReactJS Training | Edureka
What Is React | ReactJS Tutorial for Beginners | ReactJS Training | Edureka
Edureka!
 
Modern Application Development for the Enterprise
Modern Application Development for the EnterpriseModern Application Development for the Enterprise
Modern Application Development for the Enterprise
Juarez Junior
 
How To Become A Big Data Engineer? Edureka
How To Become A Big Data Engineer? EdurekaHow To Become A Big Data Engineer? Edureka
How To Become A Big Data Engineer? Edureka
Edureka!
 
WEBINAR: How Salesforce Data Archive Has Evolved & Strategies That Industries...
WEBINAR: How Salesforce Data Archive Has Evolved & Strategies That Industries...WEBINAR: How Salesforce Data Archive Has Evolved & Strategies That Industries...
WEBINAR: How Salesforce Data Archive Has Evolved & Strategies That Industries...
DataConnectiva
 
Sps Oslo - Introduce redux in your sp fx solution
Sps Oslo - Introduce redux in your sp fx solutionSps Oslo - Introduce redux in your sp fx solution
Sps Oslo - Introduce redux in your sp fx solution
Yannick Borghmans
 
Angular 4 Components | Angular 4 Tutorial For Beginners | Learn Angular 4 | E...
Angular 4 Components | Angular 4 Tutorial For Beginners | Learn Angular 4 | E...Angular 4 Components | Angular 4 Tutorial For Beginners | Learn Angular 4 | E...
Angular 4 Components | Angular 4 Tutorial For Beginners | Learn Angular 4 | E...
Edureka!
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)
Chiew Carol
 
React
ReactReact
React
Amitai Barnea
 
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Edureka!
 
Top 10 Open Source Technologies In 2018 | Trending Technologies 2018 | Edureka
Top 10 Open Source Technologies In 2018 | Trending Technologies 2018 | EdurekaTop 10 Open Source Technologies In 2018 | Trending Technologies 2018 | Edureka
Top 10 Open Source Technologies In 2018 | Trending Technologies 2018 | Edureka
Edureka!
 
Talend Data Integration Tutorial | Talend Tutorial For Beginners | Talend Onl...
Talend Data Integration Tutorial | Talend Tutorial For Beginners | Talend Onl...Talend Data Integration Tutorial | Talend Tutorial For Beginners | Talend Onl...
Talend Data Integration Tutorial | Talend Tutorial For Beginners | Talend Onl...
Edureka!
 
Omc for oracle_ebs_demo_script
Omc for oracle_ebs_demo_scriptOmc for oracle_ebs_demo_script
Omc for oracle_ebs_demo_script
Syed Irfan
 
Data Warehouse Tutorial For Beginners | Data Warehouse Concepts | Data Wareho...
Data Warehouse Tutorial For Beginners | Data Warehouse Concepts | Data Wareho...Data Warehouse Tutorial For Beginners | Data Warehouse Concepts | Data Wareho...
Data Warehouse Tutorial For Beginners | Data Warehouse Concepts | Data Wareho...
Edureka!
 
Eprcs presentatie
Eprcs presentatieEprcs presentatie
Eprcs presentatie
Finext
 
Big Data Engineer Skills and Job Description | Edureka
Big Data Engineer Skills and Job Description | EdurekaBig Data Engineer Skills and Job Description | Edureka
Big Data Engineer Skills and Job Description | Edureka
Edureka!
 
MySQL 8.0 in a nutshell
MySQL 8.0 in a nutshellMySQL 8.0 in a nutshell
MySQL 8.0 in a nutshell
OracleMySQL
 
ReactJS Tutorial For Beginners | ReactJS Redux Training For Beginners | React...
ReactJS Tutorial For Beginners | ReactJS Redux Training For Beginners | React...ReactJS Tutorial For Beginners | ReactJS Redux Training For Beginners | React...
ReactJS Tutorial For Beginners | ReactJS Redux Training For Beginners | React...
Edureka!
 
React Interview Questions and Answers | React Tutorial | React Redux Online T...
React Interview Questions and Answers | React Tutorial | React Redux Online T...React Interview Questions and Answers | React Tutorial | React Redux Online T...
React Interview Questions and Answers | React Tutorial | React Redux Online T...
Edureka!
 
React Components Lifecycle | React Tutorial for Beginners | ReactJS Training ...
React Components Lifecycle | React Tutorial for Beginners | ReactJS Training ...React Components Lifecycle | React Tutorial for Beginners | ReactJS Training ...
React Components Lifecycle | React Tutorial for Beginners | ReactJS Training ...
Edureka!
 
what is context API and How it works in React.pptx
what is context API and How it works in React.pptxwhat is context API and How it works in React.pptx
what is context API and How it works in React.pptx
BOSC Tech Labs
 
What Is React | ReactJS Tutorial for Beginners | ReactJS Training | Edureka
What Is React | ReactJS Tutorial for Beginners | ReactJS Training | EdurekaWhat Is React | ReactJS Tutorial for Beginners | ReactJS Training | Edureka
What Is React | ReactJS Tutorial for Beginners | ReactJS Training | Edureka
Edureka!
 
Modern Application Development for the Enterprise
Modern Application Development for the EnterpriseModern Application Development for the Enterprise
Modern Application Development for the Enterprise
Juarez Junior
 
How To Become A Big Data Engineer? Edureka
How To Become A Big Data Engineer? EdurekaHow To Become A Big Data Engineer? Edureka
How To Become A Big Data Engineer? Edureka
Edureka!
 
WEBINAR: How Salesforce Data Archive Has Evolved & Strategies That Industries...
WEBINAR: How Salesforce Data Archive Has Evolved & Strategies That Industries...WEBINAR: How Salesforce Data Archive Has Evolved & Strategies That Industries...
WEBINAR: How Salesforce Data Archive Has Evolved & Strategies That Industries...
DataConnectiva
 
Sps Oslo - Introduce redux in your sp fx solution
Sps Oslo - Introduce redux in your sp fx solutionSps Oslo - Introduce redux in your sp fx solution
Sps Oslo - Introduce redux in your sp fx solution
Yannick Borghmans
 
Angular 4 Components | Angular 4 Tutorial For Beginners | Learn Angular 4 | E...
Angular 4 Components | Angular 4 Tutorial For Beginners | Learn Angular 4 | E...Angular 4 Components | Angular 4 Tutorial For Beginners | Learn Angular 4 | E...
Angular 4 Components | Angular 4 Tutorial For Beginners | Learn Angular 4 | E...
Edureka!
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)
Chiew Carol
 
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Edureka!
 
Top 10 Open Source Technologies In 2018 | Trending Technologies 2018 | Edureka
Top 10 Open Source Technologies In 2018 | Trending Technologies 2018 | EdurekaTop 10 Open Source Technologies In 2018 | Trending Technologies 2018 | Edureka
Top 10 Open Source Technologies In 2018 | Trending Technologies 2018 | Edureka
Edureka!
 
Talend Data Integration Tutorial | Talend Tutorial For Beginners | Talend Onl...
Talend Data Integration Tutorial | Talend Tutorial For Beginners | Talend Onl...Talend Data Integration Tutorial | Talend Tutorial For Beginners | Talend Onl...
Talend Data Integration Tutorial | Talend Tutorial For Beginners | Talend Onl...
Edureka!
 
Omc for oracle_ebs_demo_script
Omc for oracle_ebs_demo_scriptOmc for oracle_ebs_demo_script
Omc for oracle_ebs_demo_script
Syed Irfan
 
Data Warehouse Tutorial For Beginners | Data Warehouse Concepts | Data Wareho...
Data Warehouse Tutorial For Beginners | Data Warehouse Concepts | Data Wareho...Data Warehouse Tutorial For Beginners | Data Warehouse Concepts | Data Wareho...
Data Warehouse Tutorial For Beginners | Data Warehouse Concepts | Data Wareho...
Edureka!
 
Eprcs presentatie
Eprcs presentatieEprcs presentatie
Eprcs presentatie
Finext
 
Big Data Engineer Skills and Job Description | Edureka
Big Data Engineer Skills and Job Description | EdurekaBig Data Engineer Skills and Job Description | Edureka
Big Data Engineer Skills and Job Description | Edureka
Edureka!
 
MySQL 8.0 in a nutshell
MySQL 8.0 in a nutshellMySQL 8.0 in a nutshell
MySQL 8.0 in a nutshell
OracleMySQL
 
Ad

More from Edureka! (20)

What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
Edureka!
 
What to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | EdurekaWhat to learn during the 21 days Lockdown | Edureka
What to learn during the 21 days Lockdown | Edureka
Edureka!
 
Top 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | EdurekaTop 10 Dying Programming Languages in 2020 | Edureka
Top 10 Dying Programming Languages in 2020 | Edureka
Edureka!
 
Top 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | EdurekaTop 5 Trending Business Intelligence Tools | Edureka
Top 5 Trending Business Intelligence Tools | Edureka
Edureka!
 
Tableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | EdurekaTableau Tutorial for Data Science | Edureka
Tableau Tutorial for Data Science | Edureka
Edureka!
 
Python Programming Tutorial | Edureka
Python Programming Tutorial | EdurekaPython Programming Tutorial | Edureka
Python Programming Tutorial | Edureka
Edureka!
 
Top 5 PMP Certifications | Edureka
Top 5 PMP Certifications | EdurekaTop 5 PMP Certifications | Edureka
Top 5 PMP Certifications | Edureka
Edureka!
 
Top Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | EdurekaTop Maven Interview Questions in 2020 | Edureka
Top Maven Interview Questions in 2020 | Edureka
Edureka!
 
Linux Mint Tutorial | Edureka
Linux Mint Tutorial | EdurekaLinux Mint Tutorial | Edureka
Linux Mint Tutorial | Edureka
Edureka!
 
How to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| EdurekaHow to Deploy Java Web App in AWS| Edureka
How to Deploy Java Web App in AWS| Edureka
Edureka!
 
Importance of Digital Marketing | Edureka
Importance of Digital Marketing | EdurekaImportance of Digital Marketing | Edureka
Importance of Digital Marketing | Edureka
Edureka!
 
RPA in 2020 | Edureka
RPA in 2020 | EdurekaRPA in 2020 | Edureka
RPA in 2020 | Edureka
Edureka!
 
Email Notifications in Jenkins | Edureka
Email Notifications in Jenkins | EdurekaEmail Notifications in Jenkins | Edureka
Email Notifications in Jenkins | Edureka
Edureka!
 
EA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | EdurekaEA Algorithm in Machine Learning | Edureka
EA Algorithm in Machine Learning | Edureka
Edureka!
 
Cognitive AI Tutorial | Edureka
Cognitive AI Tutorial | EdurekaCognitive AI Tutorial | Edureka
Cognitive AI Tutorial | Edureka
Edureka!
 
AWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | EdurekaAWS Cloud Practitioner Tutorial | Edureka
AWS Cloud Practitioner Tutorial | Edureka
Edureka!
 
Blue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | EdurekaBlue Prism Top Interview Questions | Edureka
Blue Prism Top Interview Questions | Edureka
Edureka!
 
Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka Big Data on AWS Tutorial | Edureka
Big Data on AWS Tutorial | Edureka
Edureka!
 
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | EdurekaA star algorithm | A* Algorithm in Artificial Intelligence | Edureka
A star algorithm | A* Algorithm in Artificial Intelligence | Edureka
Edureka!
 
Kubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | EdurekaKubernetes Installation on Ubuntu | Edureka
Kubernetes Installation on Ubuntu | Edureka
Edureka!
 
Introduction to DevOps | Edureka
Introduction to DevOps | EdurekaIntroduction to DevOps | Edureka
Introduction to DevOps | Edureka
Edureka!
 
Ad

Recently uploaded (20)

Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI FoundationsOracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent IntegrationPyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
Cisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdfCisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdf
superdpz
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdfArtificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...
Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...
Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...
Precisely
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy SurveyTrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too LateKubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free DownloadViral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOMEstablish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Anchore
 
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Safe Software
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry ReportThe State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and ImplementationAI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
Christine Shepherd
 
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Impelsys Inc.
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
“State-space Models vs. Transformers for Ultra-low-power Edge AI,” a Presenta...
Edge AI and Vision Alliance
 
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
National Fuels Treatments Initiative: Building a Seamless Map of Hazardous Fu...
Safe Software
 
Oracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI FoundationsOracle Cloud Infrastructure AI Foundations
Oracle Cloud Infrastructure AI Foundations
VICTOR MAESTRE RAMIREZ
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
Trends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary MeekerTrends Artificial Intelligence - Mary Meeker
Trends Artificial Intelligence - Mary Meeker
Clive Dickens
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
PyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent IntegrationPyData - Graph Theory for Multi-Agent Integration
PyData - Graph Theory for Multi-Agent Integration
barqawicloud
 
Cisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdfCisco ISE Performance, Scalability and Best Practices.pdf
Cisco ISE Performance, Scalability and Best Practices.pdf
superdpz
 
Artificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdfArtificial Intelligence in the Nonprofit Boardroom.pdf
Artificial Intelligence in the Nonprofit Boardroom.pdf
OnBoard
 
Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...
Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...
Precisely Demo Showcase: Powering ServiceNow Discovery with Precisely Ironstr...
Precisely
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy SurveyTrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
Kubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too LateKubernetes Security Act Now Before It’s Too Late
Kubernetes Security Act Now Before It’s Too Late
Michael Furman
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free DownloadViral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOMEstablish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Establish Visibility and Manage Risk in the Supply Chain with Anchore SBOM
Anchore
 
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025Developing Schemas with FME and Excel - Peak of Data & AI 2025
Developing Schemas with FME and Excel - Peak of Data & AI 2025
Safe Software
 
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...Your startup on AWS - How to architect and maintain a Lean and Mean account J...
Your startup on AWS - How to architect and maintain a Lean and Mean account J...
angelo60207
 
The State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry ReportThe State of Web3 Industry- Industry Report
The State of Web3 Industry- Industry Report
Liveplex
 
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and ImplementationAI Agents in Logistics and Supply Chain Applications Benefits and Implementation
AI Agents in Logistics and Supply Chain Applications Benefits and Implementation
Christine Shepherd
 
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Creating an Accessible Future-How AI-powered Accessibility Testing is Shaping...
Impelsys Inc.
 

React Redux Tutorial | Redux Tutorial for Beginners | React Redux Training | Edureka

  • 1. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Agenda ❑ What Is Artificial Intelligence ? ❑ What Is Machine Learning ? ❑ Limitations Of Machine Learning ❑ Deep Learning To The Rescue ❑ What Is Deep Learning ? ❑ Deep Learning Applications
  • 2. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Agenda Need For Redux What Is Redux? Redux Components Setting Up Components Data Flow React With Redux Demo
  • 3. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Need For Redux? Why Redux was needed?
  • 4. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Need For Redux As React is just the View, thus to control the Data Flow we use Redux as a Data Flow Architecture
  • 5. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Need For Redux ✓ In React the data flows through Components ✓ It follows uni-directional data flow i.e data always flows from parent to child component.
  • 6. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Need For Redux ✓ Child components can’t pass data to its parent component ✓ The non-parent components can’t communicate within each other ✓ React doesn't recommend direct component-to- component communication this way.
  • 7. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Need For Redux ✓ Redux offers a solution of storing all your application state in one place, called a "store“ ✓ Components then "dispatch" state changes to the store, not directly to other components. ✓ The components that need to be aware of state changes can "subscribe" to the store Store Dispatch Subscribe
  • 8. Copyright © 2017, edureka and/or its affiliates. All rights reserved. What Is Redux? What exactly is Redux?
  • 9. Copyright © 2017, edureka and/or its affiliates. All rights reserved. What Is Redux? Redux one of the hottest libraries for front end development Redux is a predictable state container for JavaScript apps Mostly used for applications State Management Developed by Dan Abramov and Andrew Clark in 2015 It is inspired by Facebook’s Flux and influenced by functional programming language Elm
  • 10. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Principles Of Redux 1 Single Store 2 State Is Read-Only 3 Change Using Pure Functions
  • 11. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Principles Of Redux 1 Single Store 2 State Is Read-only 3 Change Using Pure Functions With only React Uni-directional Data Flow, direct communication between components is not allowed
  • 12. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Principles Of Redux 1 Single Store 2 State Is Read-only Store Redux uses Store for storing all the application state at one place. Components state is stored in the Store and they receive updates from the store itself. 3 Change Using Pure Functions
  • 13. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Principles Of Redux 2 State Is Read Only 1 Single Store 3 Change Using Pure Functions You can change the state only by triggering an action which is an object describing what happened. Action: No ACTION
  • 14. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Principles Of Redux 2 State Is Read Only You can change the state only by triggering an action which is an object describing what happened. Action: switch ON 1 Single Store 3 Change Using Pure Functions
  • 15. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Pure Function Principles Of Redux 3 Change Using Pure Functions 1 Single Store 2 State Is Read Only Prev StateACTION New State Pure functions called Reducers are used to indicate how the State has been transformed by the Action
  • 16. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Redux Components 1 2 3 4 Action Reducer View Store
  • 17. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Redux Components 1 2 3 4 Action Reducer View Store
  • 18. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Action Application ACTION Store Plain JavaScript objects which are payloads of information for the store Data DataData
  • 19. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Action function addTodo(text) { return { type: ADD_TODO, text } } • Must have type property that indicates the type of ACTION being performed. • They must be defined as String constant. • You can add more properties to it. ACTION
  • 20. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Action function addTodo(text) { return { type: ADD_TODO, text } } • Functions which create ACTIONS • Takes in the message, converts it into system understandable format and returns a formatted Action Object. ACTION ACTION CREATOR
  • 21. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Redux Components 1 2 3 4 Action Reducer View Store
  • 22. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Reducer Reducer Prev State ACTION New State Reducers are pure functions which specify how the applications state changes in response to an ACTION They do not change the value of the input parameter Determines what sort of update needs to be done based on the type of the action, and returns new values It returns the previous state if no work needs to be done The root reducer slices up the state based on the State Object Keys and passes them to their respective specialized reducers Reducers don’t manipulate the original state passed to them but make their own copies and then updates them.
  • 23. Copyright © 2017, edureka and/or its affiliates. All rights reserved. function reducer(state = initialState, action) { switch (action.type) { case ADD_TODO: return Object.assign({}, state, { todos: [ ...state.todos, { text: action.text, completed: false } ] }) default: return state } } Reducer ACTION Prev State New State
  • 24. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Reducer Things you should NEVER do inside a reducer: Mutate its arguments Perform side effects like API calls and routing transitions Call non-pure functions like Date.now() or Math.random()
  • 25. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Redux Components 1 2 3 4 Action Reducer View Store
  • 26. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Store State Tree Store Store is an object which brings all the components to work together. It calculates the state changes and then notifies the root reducer about it. Application
  • 27. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Store import { createStore } from 'redux' import todoApp from './reducers’ let store = createStore(reducer) • With Store the data state can be synchronized from the server level to the client layer without much hassel. • This makes the development of large applications easier and faster. Store
  • 28. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Store Responsibilities Store Holding applications state Allowing access to state via getState() Allowing the states to be updated via dispatch(action) Registering listeners via subscribe(listener) Handles unregistering of listeners via the function returned by subscribe(listener)
  • 29. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Redux Components 1 2 3 4 Action Reducer View Store
  • 30. Copyright © 2017, edureka and/or its affiliates. All rights reserved. View Displays the data provided by the Store Store Data View
  • 31. Copyright © 2017, edureka and/or its affiliates. All rights reserved. View • Smart Components are the managers who are in charge of the actions and pass down a function in via the props to the dumb components. • Dumb Components provide information to the smart components if any action is required. They receive them as props and use them as callback. STATEFUL <Component/> STATELESS <Component/> STATELESS <Component/>
  • 32. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Flow
  • 33. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Flow Redux architecture is concentrated on a strict unidirectional data flow In an application all the data follows the same lifecycle pattern, making the logic of your app more predictable and easier to understand. It also encourages data normalization to ensure consistency
  • 34. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Flow Reducers Provider Component Actions One Store Container (Dumb Component) Container (Smart Component) Re-render when Store changes Pass Data As Props Store Store Store
  • 35. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Setting Up The Components Get Store Ready Prepare Action Callbacks Set Up Communication
  • 36. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Setting Up The Components Action Creator
  • 37. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Setting Up The Components Reducers
  • 38. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Setting Up The Components Views
  • 39. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Setting Up The Components Store
  • 40. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Setting Up The Components Provider
  • 41. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Setting Up The Components Root Component
  • 42. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Get Store Ready Prepare Action Callbacks Set Up Communication
  • 43. Copyright © 2017, edureka and/or its affiliates. All rights reserved. 1. Get the store ready Hey store you are Hired. Here is my Reducer team to help you out.
  • 44. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Get Store Ready Prepare Action Callbacks Set Up Communication
  • 45. Copyright © 2017, edureka and/or its affiliates. All rights reserved. 2. Set up the communication between the store and the components Hey Provider, this is the store I hired Ohk..let me set up a network to keep your components updated Great! Let me connect to get the updates
  • 46. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Get Store Ready Prepare Action Callbacks Set Up Communication
  • 47. Copyright © 2017, edureka and/or its affiliates. All rights reserved. 3. Prepare the action callbacks I need to make it easy for dumb components to understand I should bind the action creator and the dispatcher so that the dumb component can just call the callback
  • 48. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Flow
  • 49. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Flow Name = Maxx
  • 50. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Flow 1 Type: NAME_UPDATE Pos: 2 Value:”Maxx” UID: 101
  • 51. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Flow 2 1
  • 52. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Flow 2 3 1 Here is the current state tree. Calculate how new state tree should look.
  • 53. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Flow 2 3 1 Here is your slice 4
  • 54. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Flow 2 3 1 4 5 Let me just copy the slice and update it. Ohk.. Now this how the slice looks like
  • 55. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Flow 2 3 1 4 5 6
  • 56. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Flow 2 3 1 4 5 6 7
  • 57. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Flow 2 3 1 4 5 6 7 8
  • 58. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Data Flow 2 3 1 4 5 6 7 8 Here is the new state tree. Now you can re- render your component trees respectively 9
  • 59. Copyright © 2017, edureka and/or its affiliates. All rights reserved. React With Redux
  • 60. Copyright © 2017, edureka and/or its affiliates. All rights reserved. React With Redux React bindings are not included in Redux by default so you need to install them explicitly: npm install --save react-redux You have to add these dependency along with babel, react and webpack
  • 61. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Demo
  • 62. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Demo ▪ We will be creating an simple User List application using Redux with React
  • 63. Copyright © 2017, edureka and/or its affiliates. All rights reserved. Popularity