SlideShare a Scribd company logo
Getting Started with React and Redux
What is ReactJS?
● An open source JavaScript library used to
create dynamic UIs for web applications
● UI / View ONLY
● No Assumptions
● Component Based
● Isomorphic JavaScript
● Design simple views for each state in your
application
● Updates and renders ONLY the parts needed
● More predictable and easier to debug
React Is Declarative
Component-Based
● Encapsulated components that can work
together but make no assumptions
● Keep state out of the DOM and pass rich data
through your app
● Components can be nested and can pass state
and properties to one another
● Provides better readability and reusability
▪ Props (or properties) are a components configuration
or options
▪ Components can pass props to other components
▪ Props are received from above and are immutable as
far as the component receiving them are concerned
this.props.name
Props
● Looks similar to XML
● Defines a familiar syntax for defining tree structures with
attributes
● Isn’t required but makes things easier
JSX – JavaScript Syntax Extension
Component Example
var Hello = React.createClass({
render: function() {
return <div>Hello {this.props.name}</div>;
}
});
ReactDOM.render(
<Hello name="World" />,
document.getElementById('container')
);
Page Components
What is Redux?
●
Redux is a predictable state container for JavaScript
applications
●
It helps to write applications that behave consistently,
run on different environments and are easy to test
●
Redux does NOT need React or any other library or
framework
Reducers
▪ Changes are made with pure functions called “Reducers”
▪ Reducers take the previous state and an action, and
return the next state
▪ You can start with a single reducer and then split and
combine multiple reducers as the app scales
Simple Example
store.dispatch({
type: 'INC',
payload: 1
});
store.dispatch({
type: ‘DEC',
payload: 1
});
const reducer = function(state, action){
// Make changes to state based on action
if(action.type == 'INC'){
return state + action.payload;
}
else if(action.type == 'DEC'){
return state - action.payload;
}
return state;
}
Flux
▪ Redux was inspired by Flux which is also an application
architecture that helps manage state
▪ Both Flux and Redux suggest keeping your model and
update logic in a certain layer of your application. In Redux,
these are “reducers” and in flux, these are “stores”
▪ Redux does not have the concept of a dispatcher
Store
Stores bring together actions and reducers. Stores have the following
responsibilities…
▪ Hold application state
▪ Allows access to state using getState();
▪ Allows actions to update state via dispatch
▪ Registers listeners via subscribe(listener);
▪ Handles unregistering of listeners via the function returned by
subscribe(listener).
Creating a Store
▪ Redux uses single stores and uses reducers to split
data handling logic
import { createStore } from 'redux'
import todoApp from './reducers'
let store = createStore(todoApp)
store.subscribe(() => {
console.log('Store Changed...', store.getState());
});
Other Inspirations
▪ Elm – Functional Programming language which enforces a
model view update architecture
▪ Immutable – JS library implementing persistent data
structures
▪ Rx (Reactive Extensions) – Helps manage asynchronous
data
The Complete Web Development Tutorial
Using React and Redux - Eduonix
Lectures: 29
Video: 4 hours of Content
Languages: English
Includes:
30 day money back guarantee! Lifetime Access. No Limits!
Certificate of Completion
In this Course you will learn
● What is React and Redux
● A brief introduction to JSX, the JavaScript extension
● A detailed breakdown of React and its core features including state &
nested components, methods and PropTypes & Validation
● A detailed breakdown of Redux and its core features including state,
store and reducers
● How to install and work with Webpack
● How to fetch data from an API
● Using React and Redux together to create a WeatherCheck Application
To Get this Course at $10 Use Coupon Code : OFFER10
Connect with us on Social Platforms
Reference Link
https://www.eduonix.com/courses/Web-Development/the-complete-web-develop
ment-tutorial-using-react-and-redux
Thank You

More Related Content

PDF
ReactJS - A quick introduction to Awesomeness
Ronny Haase
 
PDF
Database and Java Database Connectivity
Gary Yeh
 
PPTX
Java DataBase Connectivity API (JDBC API)
Luzan Baral
 
PPTX
java Jdbc
Ankit Desai
 
PDF
Overview Of JDBC
Mindfire Solutions
 
PDF
PL-SQL, Cursors & Triggers
Shalabh Chaudhary
 
PPTX
Mule jdbc
Rajarajan Sadhasivam
 
ReactJS - A quick introduction to Awesomeness
Ronny Haase
 
Database and Java Database Connectivity
Gary Yeh
 
Java DataBase Connectivity API (JDBC API)
Luzan Baral
 
java Jdbc
Ankit Desai
 
Overview Of JDBC
Mindfire Solutions
 
PL-SQL, Cursors & Triggers
Shalabh Chaudhary
 

What's hot (19)

PPT
JDBC Connectivity Model
kunj desai
 
PPTX
Connecting to external_application
Rajarajan Sadhasivam
 
PPTX
embedded-static-&dynamic
Saranya Natarajan
 
PDF
Pl sql-ch2
Mukesh Tekwani
 
PPT
Java database connectivity
Vaishali Modi
 
PPTX
Introduction to React JS
Arnold Asllani
 
PPTX
MuleSoft ESB - CSV File to Database
akashdprajapati
 
PPT
Jdbc
leminhvuong
 
PPTX
Java.sql package
myrajendra
 
PPTX
JDBC ppt
Rohit Jain
 
PPTX
Jdbc_ravi_2016
Ravinder Singh Karki
 
PDF
Jdbc connectivity in java
Muthukumaran Subramanian
 
PPT
JDBC Architecture and Drivers
SimoniShah6
 
PPTX
Jdbc
Yamuna Devi
 
PPTX
Stored Procedure With In Out Parameters in Mule 3.6
Sashidhar Rao GDS
 
JDBC Connectivity Model
kunj desai
 
Connecting to external_application
Rajarajan Sadhasivam
 
embedded-static-&dynamic
Saranya Natarajan
 
Pl sql-ch2
Mukesh Tekwani
 
Java database connectivity
Vaishali Modi
 
Introduction to React JS
Arnold Asllani
 
MuleSoft ESB - CSV File to Database
akashdprajapati
 
Java.sql package
myrajendra
 
JDBC ppt
Rohit Jain
 
Jdbc_ravi_2016
Ravinder Singh Karki
 
Jdbc connectivity in java
Muthukumaran Subramanian
 
JDBC Architecture and Drivers
SimoniShah6
 
Stored Procedure With In Out Parameters in Mule 3.6
Sashidhar Rao GDS
 
Ad

Similar to Getting started with React and Redux (20)

PDF
The Road To Redux
Jeffrey Sanchez
 
PPTX
downloads_introduction to redux.pptx
NavneetKumar111924
 
PPTX
Introduction to ReactJS UI Web Dev .pptx
SHAIKIRFAN715544
 
PPTX
Introduction to React JS.pptx
SHAIKIRFAN715544
 
PPTX
Presentation on "An Introduction to ReactJS"
Flipkart
 
PPTX
BackboneJS + ReactJS
Skanda Shastry
 
ODP
Fluxxor react library
Karthick Kumar
 
PDF
React
Amitai Barnea
 
PPTX
reactJS
Syam Santhosh
 
PPTX
React JS - A quick introduction tutorial
Mohammed Fazuluddin
 
PPTX
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
zmulani8
 
PPTX
Reactjs notes.pptx for web development- tutorial and theory
jobinThomas54
 
PDF
An Intense Overview of the React Ecosystem
Rami Sayar
 
PDF
An Overview of the React Ecosystem
FITC
 
PDF
Introduction to Functional Reactive Web with Clojurescript
John Stevenson
 
PPTX
React-JS.pptx
AnmolPandita7
 
PPTX
ReactJS
Ram Murat Sharma
 
PPTX
React js programming concept
Tariqul islam
 
PDF
Akka (1)
Rahul Shukla
 
PDF
unit 3_Adv WTAdvanced Web Tecg Design_HTML_CSS_JAVASCRIPT_AJAX_PPT.pdf
GauravDwivedi695361
 
The Road To Redux
Jeffrey Sanchez
 
downloads_introduction to redux.pptx
NavneetKumar111924
 
Introduction to ReactJS UI Web Dev .pptx
SHAIKIRFAN715544
 
Introduction to React JS.pptx
SHAIKIRFAN715544
 
Presentation on "An Introduction to ReactJS"
Flipkart
 
BackboneJS + ReactJS
Skanda Shastry
 
Fluxxor react library
Karthick Kumar
 
reactJS
Syam Santhosh
 
React JS - A quick introduction tutorial
Mohammed Fazuluddin
 
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
zmulani8
 
Reactjs notes.pptx for web development- tutorial and theory
jobinThomas54
 
An Intense Overview of the React Ecosystem
Rami Sayar
 
An Overview of the React Ecosystem
FITC
 
Introduction to Functional Reactive Web with Clojurescript
John Stevenson
 
React-JS.pptx
AnmolPandita7
 
React js programming concept
Tariqul islam
 
Akka (1)
Rahul Shukla
 
unit 3_Adv WTAdvanced Web Tecg Design_HTML_CSS_JAVASCRIPT_AJAX_PPT.pdf
GauravDwivedi695361
 
Ad

More from Paddy Lock (13)

PDF
An Inforgraphic to Learn React Native
Paddy Lock
 
ODP
An Introduction to Vuejs
Paddy Lock
 
ODP
Docker for Professionals: The Practical Guide
Paddy Lock
 
PPTX
Beginners Guide to Modeling with Maya
Paddy Lock
 
PPTX
Introduction to Redis
Paddy Lock
 
PPTX
PPT on Angular 2 Development Tutorial
Paddy Lock
 
PPTX
PPT on Photoshop
Paddy Lock
 
PPTX
Advance Javascript for Coders
Paddy Lock
 
PPTX
A Complete Guide For Effective Business Communication – A Course from Eduonix
Paddy Lock
 
PPTX
Clojure Fundamentals Course For Beginners
Paddy Lock
 
PPTX
Linux Administrator - The Linux Course on Eduonix
Paddy Lock
 
PDF
Infographic on Scala Programming Language
Paddy Lock
 
PPTX
Presentation on Eduonix
Paddy Lock
 
An Inforgraphic to Learn React Native
Paddy Lock
 
An Introduction to Vuejs
Paddy Lock
 
Docker for Professionals: The Practical Guide
Paddy Lock
 
Beginners Guide to Modeling with Maya
Paddy Lock
 
Introduction to Redis
Paddy Lock
 
PPT on Angular 2 Development Tutorial
Paddy Lock
 
PPT on Photoshop
Paddy Lock
 
Advance Javascript for Coders
Paddy Lock
 
A Complete Guide For Effective Business Communication – A Course from Eduonix
Paddy Lock
 
Clojure Fundamentals Course For Beginners
Paddy Lock
 
Linux Administrator - The Linux Course on Eduonix
Paddy Lock
 
Infographic on Scala Programming Language
Paddy Lock
 
Presentation on Eduonix
Paddy Lock
 

Recently uploaded (20)

PDF
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
PDF
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PDF
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Doc9.....................................
SofiaCollazos
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
PPT
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
REPORT: Heating appliances market in Poland 2024
SPIUG
 
PPTX
IoT Sensor Integration 2025 Powering Smart Tech and Industrial Automation.pptx
Rejig Digital
 
PPTX
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
PDF
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
PPTX
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
Accelerating Oracle Database 23ai Troubleshooting with Oracle AHF Fleet Insig...
Sandesh Rao
 
Google I/O Extended 2025 Baku - all ppts
HusseinMalikMammadli
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
The Evolution of KM Roles (Presented at Knowledge Summit Dublin 2025)
Enterprise Knowledge
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Doc9.....................................
SofiaCollazos
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Safe Software
 
Coupa-Kickoff-Meeting-Template presentai
annapureddyn
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
REPORT: Heating appliances market in Poland 2024
SPIUG
 
IoT Sensor Integration 2025 Powering Smart Tech and Industrial Automation.pptx
Rejig Digital
 
ChatGPT's Deck on The Enduring Legacy of Fax Machines
Greg Swan
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
Event Presentation Google Cloud Next Extended 2025
minhtrietgect
 
NewMind AI Weekly Chronicles - July'25 - Week IV
NewMind AI
 
Applied-Statistics-Mastering-Data-Driven-Decisions.pptx
parmaryashparmaryash
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 

Getting started with React and Redux

  • 1. Getting Started with React and Redux
  • 2. What is ReactJS? ● An open source JavaScript library used to create dynamic UIs for web applications ● UI / View ONLY ● No Assumptions ● Component Based ● Isomorphic JavaScript
  • 3. ● Design simple views for each state in your application ● Updates and renders ONLY the parts needed ● More predictable and easier to debug React Is Declarative
  • 4. Component-Based ● Encapsulated components that can work together but make no assumptions ● Keep state out of the DOM and pass rich data through your app ● Components can be nested and can pass state and properties to one another ● Provides better readability and reusability
  • 5. ▪ Props (or properties) are a components configuration or options ▪ Components can pass props to other components ▪ Props are received from above and are immutable as far as the component receiving them are concerned this.props.name Props
  • 6. ● Looks similar to XML ● Defines a familiar syntax for defining tree structures with attributes ● Isn’t required but makes things easier JSX – JavaScript Syntax Extension
  • 7. Component Example var Hello = React.createClass({ render: function() { return <div>Hello {this.props.name}</div>; } }); ReactDOM.render( <Hello name="World" />, document.getElementById('container') );
  • 9. What is Redux? ● Redux is a predictable state container for JavaScript applications ● It helps to write applications that behave consistently, run on different environments and are easy to test ● Redux does NOT need React or any other library or framework
  • 10. Reducers ▪ Changes are made with pure functions called “Reducers” ▪ Reducers take the previous state and an action, and return the next state ▪ You can start with a single reducer and then split and combine multiple reducers as the app scales
  • 11. Simple Example store.dispatch({ type: 'INC', payload: 1 }); store.dispatch({ type: ‘DEC', payload: 1 }); const reducer = function(state, action){ // Make changes to state based on action if(action.type == 'INC'){ return state + action.payload; } else if(action.type == 'DEC'){ return state - action.payload; } return state; }
  • 12. Flux ▪ Redux was inspired by Flux which is also an application architecture that helps manage state ▪ Both Flux and Redux suggest keeping your model and update logic in a certain layer of your application. In Redux, these are “reducers” and in flux, these are “stores” ▪ Redux does not have the concept of a dispatcher
  • 13. Store Stores bring together actions and reducers. Stores have the following responsibilities… ▪ Hold application state ▪ Allows access to state using getState(); ▪ Allows actions to update state via dispatch ▪ Registers listeners via subscribe(listener); ▪ Handles unregistering of listeners via the function returned by subscribe(listener).
  • 14. Creating a Store ▪ Redux uses single stores and uses reducers to split data handling logic import { createStore } from 'redux' import todoApp from './reducers' let store = createStore(todoApp) store.subscribe(() => { console.log('Store Changed...', store.getState()); });
  • 15. Other Inspirations ▪ Elm – Functional Programming language which enforces a model view update architecture ▪ Immutable – JS library implementing persistent data structures ▪ Rx (Reactive Extensions) – Helps manage asynchronous data
  • 16. The Complete Web Development Tutorial Using React and Redux - Eduonix Lectures: 29 Video: 4 hours of Content Languages: English Includes: 30 day money back guarantee! Lifetime Access. No Limits! Certificate of Completion
  • 17. In this Course you will learn ● What is React and Redux ● A brief introduction to JSX, the JavaScript extension ● A detailed breakdown of React and its core features including state & nested components, methods and PropTypes & Validation ● A detailed breakdown of Redux and its core features including state, store and reducers ● How to install and work with Webpack ● How to fetch data from an API ● Using React and Redux together to create a WeatherCheck Application
  • 18. To Get this Course at $10 Use Coupon Code : OFFER10 Connect with us on Social Platforms Reference Link https://www.eduonix.com/courses/Web-Development/the-complete-web-develop ment-tutorial-using-react-and-redux