REACT JS
A JAVASCRIPT LIBRARY FOR BUILDING USER INTERFACES
➤ Declarative
➤ Component-Based
➤ Learn Once, Write Anywhere
React is all about building components. The only thing to do with react is building components . They are incapsulated,
reusable and easy testing.
Imperative: $(button).removeClass('red').addClass('blue').
Declarative: this.setState({button: ‘blue’}); // color: this.state.button
It is a component oriented abstraction
FEATURES
➤ One-way data flow
➤ Virtual DOM
➤ JSX
➤ Architecture beyond HTML
➤ Simple semantics (props, state, lifecycle)
➤ React Native
virtual-dom is a collection of modules designed to provide a declarative way of representing the DOM for your app.
So instead of updating the DOM when your application state changes, you simply create a virtual tree or VTree,
which looks like the DOM state that you want.
JSX is a statically-typed, object-oriented programming language designed to run on modern web browsers.
Javascript XML based extension that compile just the template part of your code.
faster (12% faster on iOS 5.1, 29% faster on Android 2.3) / safer / easier ( offer solid class system )
The basic architecture of React applies beyond rendering HTML in the browser.
React architecture in IOS/Android native apps.
No classical MVC just COMPONENTS and one way data flow!!!
VS
VIRTUAL DOM Dom mirroring
RENDER CALLS ON EVERY STATE UPDATE
render: function () {
return <p> Hello {this.props.text}</p>;
}
➤ <p> - pure javascript, in-memory representation of DOM node
➤ render fires whenever something changes
PROPS AND STATE
PROPS - data that can be IMMUTABLE
const childComponent = React.createClass({

…

doStuff: function() {

this.props.foo = ‘smth else’; < error

}

})
STATE - data that can be MUTABLE
const childComponent = React.createClass({

…

doStuff: function() {

this.setState({foo: ’smth else’}); < ok

}

})
Components can get immutable data via props from parent components (flow)
or managed their own state via state…
React JS and Redux
React JS and Redux
INLINE STYLES
var divStyle = {
padding: 10,
margin: 10,
backgroundColor: this.props.bgcolor,
color: "#333",
display: "inline-block",
fontFamily: "monospace",
fontSize: "32",
textAlign: "center"
};
ReactDOM.render(<div style={divStyle}>Hello World!</div>, mountNode);
REACT COMPONENT AND PROPS
REACT COMPONENT AND STATE
MANAGING STATE AND COMPONENT LIFECYCLE
REACT ROUTING
React Router is a powerful routing library built on top of React that helps you add new screens
and flows to your application incredibly quickly, all while keeping the URL in sync with what's
being displayed on the page.
// First we import some modules...
import { Router, Route, IndexRoute, Link, hashHistory } from 'react-router'
render((
<Router history={hashHistory}>
<Route path="/" component={App}>
<IndexRoute component={Home} />
<Route path="about" component={About} />
<Route path="inbox" component={Inbox} />
</Route>
</Router>
), document.body)
PROS AND CONS
➤ License
"The license granted hereunder will terminate, automatically and without notice, if you initiate directly or indirectly, or
take a direct financial interest in, any Patent Assertion: (i) against Facebook or any of its subsidiaries or corporate
affiliates, (ii) against any party if such Patent Assertion arises in whole or in part from any software, technology,
product or service of Facebook or any of its subsidiaries or corporate affiliates, or (iii) against any party relating to the
Software. [...]
CONS
PROS
➤ Components are reusable anywhere in your app.
➤ Testing / Isolated components / Virtual DOM / Isomorphic
➤ Simple UI structure.
➤ It's not a full framework.
➤ It's kind of verbose.
Writing components isn't as straight forward as pure HTML & JS , everything inside component…
➤ It's not a full framework.

More Related Content

PDF
React state managmenet with Redux
PPTX
Academy PRO: React JS. Redux & Tooling
PPTX
React / Redux Architectures
PDF
React, Redux, ES2015 by Max Petruck
PPTX
React + Redux Introduction
PPTX
React & redux
PPTX
Redux training
PDF
React.js and Redux overview
React state managmenet with Redux
Academy PRO: React JS. Redux & Tooling
React / Redux Architectures
React, Redux, ES2015 by Max Petruck
React + Redux Introduction
React & redux
Redux training
React.js and Redux overview

What's hot (20)

PPTX
Better web apps with React and Redux
PPTX
PDF
React for Dummies
PPTX
Introduction to react and redux
PDF
React & Redux
PDF
Switch to React.js from AngularJS developer
PPTX
React with Redux
PDF
React & Redux
PDF
An Introduction to ReactJS
PPTX
ReactJs presentation
PDF
React redux
PPTX
Getting started with Redux js
PDF
Redux vs Alt
PDF
An introduction to React.js
PDF
React.js in real world apps.
PDF
Intro to ReactJS
PDF
React JS - Introduction
PPTX
A Brief Introduction to React.js
PPTX
Getting Started With ReactJS
PPTX
ProvJS: Six Months of ReactJS and Redux
Better web apps with React and Redux
React for Dummies
Introduction to react and redux
React & Redux
Switch to React.js from AngularJS developer
React with Redux
React & Redux
An Introduction to ReactJS
ReactJs presentation
React redux
Getting started with Redux js
Redux vs Alt
An introduction to React.js
React.js in real world apps.
Intro to ReactJS
React JS - Introduction
A Brief Introduction to React.js
Getting Started With ReactJS
ProvJS: Six Months of ReactJS and Redux
Ad

Similar to React JS and Redux (20)

PPTX
reacts js with basic details Detailed_ReactJS_Presentation.pptx
PPTX
ReactJS (1)
PPTX
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
PPTX
[Final] ReactJS presentation
PPTX
React.js - The Dawn of Virtual DOM
PPTX
reactJS
PPTX
PPTX
React Workshop: Core concepts of react
PPTX
Up and Running with ReactJS
PDF
Tech Talk on ReactJS
PPTX
React workshop
PPTX
Introduction to ReactJS UI Web Dev .pptx
PPTX
2.React tttttttttttttttttttttttttttttttt
PPTX
Introduction to React JS.pptx
DOCX
Skill practical javascript diy projects
PPTX
PPTX
React js
PPTX
Mastering React: Building Modern and Interactive User Interfaces
PPTX
React for JavaScipt Introduction and functions
PDF
React Fundamentals - Jakarta JS, Apr 2016
reacts js with basic details Detailed_ReactJS_Presentation.pptx
ReactJS (1)
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
[Final] ReactJS presentation
React.js - The Dawn of Virtual DOM
reactJS
React Workshop: Core concepts of react
Up and Running with ReactJS
Tech Talk on ReactJS
React workshop
Introduction to ReactJS UI Web Dev .pptx
2.React tttttttttttttttttttttttttttttttt
Introduction to React JS.pptx
Skill practical javascript diy projects
React js
Mastering React: Building Modern and Interactive User Interfaces
React for JavaScipt Introduction and functions
React Fundamentals - Jakarta JS, Apr 2016
Ad

Recently uploaded (20)

PDF
Decision Optimization - From Theory to Practice
PDF
Examining Bias in AI Generated News Content.pdf
PDF
TrustArc Webinar - Data Minimization in Practice_ Reducing Risk, Enhancing Co...
PDF
Addressing the challenges of harmonizing law and artificial intelligence tech...
PPTX
Rise of the Digital Control Grid Zeee Media and Hope and Tivon FTWProject.com
PDF
Child-friendly e-learning for artificial intelligence education in Indonesia:...
PDF
Intravenous drug administration application for pediatric patients via augmen...
PDF
Rooftops detection with YOLOv8 from aerial imagery and a brief review on roof...
PDF
Uncertainty-aware contextual multi-armed bandits for recommendations in e-com...
PDF
Ebook - The Future of AI A Comprehensive Guide.pdf
PDF
“Introduction to Designing with AI Agents,” a Presentation from Amazon Web Se...
PPTX
Slides World Game (s) Great Redesign Eco Economic Epochs.pptx
PDF
NewMind AI Journal Monthly Chronicles - August 2025
PDF
eBook Outline_ AI in Cybersecurity – The Future of Digital Defense.pdf
PDF
Advancements in abstractive text summarization: a deep learning approach
PPTX
AQUEEL MUSHTAQUE FAKIH COMPUTER CENTER .
PDF
The Digital Engine Room: Unlocking APAC’s Economic and Digital Potential thro...
PDF
Gestión Unificada de los Riegos Externos
PDF
【AI論文解説】高速・高品質な生成を実現するFlow Map Models(Part 1~3)
PDF
FASHION-DRIVEN TEXTILES AS A CRYSTAL OF A NEW STREAM FOR STAKEHOLDER CAPITALI...
Decision Optimization - From Theory to Practice
Examining Bias in AI Generated News Content.pdf
TrustArc Webinar - Data Minimization in Practice_ Reducing Risk, Enhancing Co...
Addressing the challenges of harmonizing law and artificial intelligence tech...
Rise of the Digital Control Grid Zeee Media and Hope and Tivon FTWProject.com
Child-friendly e-learning for artificial intelligence education in Indonesia:...
Intravenous drug administration application for pediatric patients via augmen...
Rooftops detection with YOLOv8 from aerial imagery and a brief review on roof...
Uncertainty-aware contextual multi-armed bandits for recommendations in e-com...
Ebook - The Future of AI A Comprehensive Guide.pdf
“Introduction to Designing with AI Agents,” a Presentation from Amazon Web Se...
Slides World Game (s) Great Redesign Eco Economic Epochs.pptx
NewMind AI Journal Monthly Chronicles - August 2025
eBook Outline_ AI in Cybersecurity – The Future of Digital Defense.pdf
Advancements in abstractive text summarization: a deep learning approach
AQUEEL MUSHTAQUE FAKIH COMPUTER CENTER .
The Digital Engine Room: Unlocking APAC’s Economic and Digital Potential thro...
Gestión Unificada de los Riegos Externos
【AI論文解説】高速・高品質な生成を実現するFlow Map Models(Part 1~3)
FASHION-DRIVEN TEXTILES AS A CRYSTAL OF A NEW STREAM FOR STAKEHOLDER CAPITALI...

React JS and Redux

  • 1. REACT JS A JAVASCRIPT LIBRARY FOR BUILDING USER INTERFACES ➤ Declarative ➤ Component-Based ➤ Learn Once, Write Anywhere React is all about building components. The only thing to do with react is building components . They are incapsulated, reusable and easy testing. Imperative: $(button).removeClass('red').addClass('blue'). Declarative: this.setState({button: ‘blue’}); // color: this.state.button It is a component oriented abstraction
  • 2. FEATURES ➤ One-way data flow ➤ Virtual DOM ➤ JSX ➤ Architecture beyond HTML ➤ Simple semantics (props, state, lifecycle) ➤ React Native virtual-dom is a collection of modules designed to provide a declarative way of representing the DOM for your app. So instead of updating the DOM when your application state changes, you simply create a virtual tree or VTree, which looks like the DOM state that you want. JSX is a statically-typed, object-oriented programming language designed to run on modern web browsers. Javascript XML based extension that compile just the template part of your code. faster (12% faster on iOS 5.1, 29% faster on Android 2.3) / safer / easier ( offer solid class system ) The basic architecture of React applies beyond rendering HTML in the browser. React architecture in IOS/Android native apps.
  • 3. No classical MVC just COMPONENTS and one way data flow!!! VS
  • 4. VIRTUAL DOM Dom mirroring
  • 5. RENDER CALLS ON EVERY STATE UPDATE render: function () { return <p> Hello {this.props.text}</p>; } ➤ <p> - pure javascript, in-memory representation of DOM node ➤ render fires whenever something changes
  • 6. PROPS AND STATE PROPS - data that can be IMMUTABLE const childComponent = React.createClass({
 …
 doStuff: function() {
 this.props.foo = ‘smth else’; < error
 }
 }) STATE - data that can be MUTABLE const childComponent = React.createClass({
 …
 doStuff: function() {
 this.setState({foo: ’smth else’}); < ok
 }
 }) Components can get immutable data via props from parent components (flow) or managed their own state via state…
  • 9. INLINE STYLES var divStyle = { padding: 10, margin: 10, backgroundColor: this.props.bgcolor, color: "#333", display: "inline-block", fontFamily: "monospace", fontSize: "32", textAlign: "center" }; ReactDOM.render(<div style={divStyle}>Hello World!</div>, mountNode);
  • 12. MANAGING STATE AND COMPONENT LIFECYCLE
  • 13. REACT ROUTING React Router is a powerful routing library built on top of React that helps you add new screens and flows to your application incredibly quickly, all while keeping the URL in sync with what's being displayed on the page. // First we import some modules... import { Router, Route, IndexRoute, Link, hashHistory } from 'react-router' render(( <Router history={hashHistory}> <Route path="/" component={App}> <IndexRoute component={Home} /> <Route path="about" component={About} /> <Route path="inbox" component={Inbox} /> </Route> </Router> ), document.body)
  • 14. PROS AND CONS ➤ License "The license granted hereunder will terminate, automatically and without notice, if you initiate directly or indirectly, or take a direct financial interest in, any Patent Assertion: (i) against Facebook or any of its subsidiaries or corporate affiliates, (ii) against any party if such Patent Assertion arises in whole or in part from any software, technology, product or service of Facebook or any of its subsidiaries or corporate affiliates, or (iii) against any party relating to the Software. [...] CONS PROS ➤ Components are reusable anywhere in your app. ➤ Testing / Isolated components / Virtual DOM / Isomorphic ➤ Simple UI structure. ➤ It's not a full framework. ➤ It's kind of verbose. Writing components isn't as straight forward as pure HTML & JS , everything inside component… ➤ It's not a full framework.