SlideShare a Scribd company logo
GETTING STARTED
WITH REACTJS
VIEW
AGENDA
Installing ReactJS ReactJS event handling ReactJS lifecycle example
Configuring ReactJS Useful non-DOM attributes Stateful custom component
Using ReactJS ReactJS component
lifecycle
Precompiled JSX for
production
What is JSX ReactJS initialization
phase
JSX file watcher
Custom components with
JSX
ReactJS lifetime phase Developing a digital clock
using ReactJS
ReactJS inline style ReactJS teardown phase Debugging ReactJS
OUT OF SCOPE
Comparing ReactJS with Other framework
Building React Routing
Isomorphic React
React Native
Synthetic Event
React ES6 implementation
WHO AM I?
 Sandeep Kumar Patel
 Intuit PTG Developer
 Blog: www.tutorialsavvy.com
REQUIRED SOFTWARE
Code Editor (WebStorm)
NPM (Node Package Manager)
GIT (Code Repository)
REACTJS INSTALLATION
Create a project Directory
Change the Current Working Directory
Run npm init for creating package.json
Run npm install react --save
Verify node_modules directory
CONFIGURING REACTJS
LOCAL
<script src="node_modules/react/react.js"></script>
<script src="node_modules/react/JSXTransformer.js"> </script>
CDN
<script src="https://fb.me/react-0.13.3.min.js"></script>
<script src="https://fb.me/JSXTransformer-0.13.3.js"></script>
WHAT IS JSX ?
JavaScript syntax extension
HTML like syntax
JSX Transformer
In browser compilation
CUSTOM COMPONENTS WITH JSX
<script type="text/jsx">
var HelloMessage = React.createClass({
render: function() {
return ( <h1 className="headerStyle">
Hello ReactJS
</h1>
); } });
React.render(<HelloMessage/>, document.body);
</script>
REACTJS INLINE STYLE
Key-value pair
var styleObject={
styleAttribute: "styleValue",
};
styleAttribute : camel case
styleValue: wrapped in double quotes
Example
REACTJS EVENT HANDLING
Similar to HTML DOM events
Difference in naming handlers
Handlers are camel case
onclick becomes onClick
Example
USEFUL NON-DOM ATTRIBUTES
key:
This is an optional attribute can be used for uniquely identify each component in the page.
ref:
This is an optional attribute that can be used to access the child element from outside of render()
method.
dangerouslySetInnerHTML:
This attribute can be used inside JSX element to set HTML content inside the component.
Example
REACTJS COMPONENT LIFECYCLE
REACTJS INITIALIZATION PHASE
element is created for the 1st time.
has slight changes during lifetime
REACTJS LIFETIME PHASE
the phase when element lives.
changes its states and properties
REACTJS TEARDOWN PHASE
the phase when element finishes its execution
clean-up takes place.
REACTJS LIFECYCLE EXAMPLE
Let’s checkout an simple React Component <Welcome>
To determine the order of execution of these lifecycle methods
Example
STATEFUL CUSTOM COMPONENT
To refer the component state : this.states
To change the component state : this.setState(<object>)
Object: {key:value}
Example
PRECOMPILED JSX FOR PRODUCTION
Remove in browser JSX transformer
React-tools
npm install -g react-tools
Example
JSX FILE WATCHER
Comes with react-tools
jsx --watch dev production
DEVELOPING A DIGITAL CLOCK USING REACTJS
Develop a digital Clock in React Component to Hour minute and seconds
DEBUGGING REACTJS
React Chrome Debugging tool
https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi
ADD VIRTUAL DOM
Virtual DOM is Simple and Fast
Batch Execution updates
THANK YOU
CONTACT ME:
Email: sandeepkumar_patel@intuit.com
Gmail: sandeeppateltech@gmail.com
Book: http://techbus.safaribooksonline.com/book/web-development/9781784393649

More Related Content

PPTX
ReactJs presentation
nishasowdri
 
PDF
Intro to ReactJS
Harvard Web Working Group
 
PPTX
ReactJS for Beginners
Oswald Campesato
 
PPTX
A Brief Introduction to React.js
Doug Neiner
 
PPTX
Better web apps with React and Redux
Ali Sa'o
 
PDF
React.js in real world apps.
Emanuele DelBono
 
PPTX
React + Redux Introduction
Nikolaus Graf
 
PDF
React.js and Redux overview
Alex Bachuk
 
ReactJs presentation
nishasowdri
 
Intro to ReactJS
Harvard Web Working Group
 
ReactJS for Beginners
Oswald Campesato
 
A Brief Introduction to React.js
Doug Neiner
 
Better web apps with React and Redux
Ali Sa'o
 
React.js in real world apps.
Emanuele DelBono
 
React + Redux Introduction
Nikolaus Graf
 
React.js and Redux overview
Alex Bachuk
 

What's hot (20)

PDF
React JS - Introduction
Sergey Romaneko
 
PPTX
React / Redux Architectures
Vinícius Ribeiro
 
PPTX
Academy PRO: React JS. Redux & Tooling
Binary Studio
 
PPTX
React & redux
Cédric Hartland
 
PDF
React JS and Redux
Glib Kechyn
 
PPT
React js
Jai Santhosh
 
PDF
Introduction to ReactJS
Hoang Long
 
PPTX
Up and Running with ReactJS
Loc Nguyen
 
PPTX
Getting started with Redux js
Citrix
 
PDF
React state managmenet with Redux
Vedran Blaženka
 
PDF
React for Dummies
Mitch Chen
 
PDF
An Introduction to ReactJS
All Things Open
 
PPT
Starting with Reactjs
Thinh VoXuan
 
PPTX
20180518 QNAP Seminar - Introduction to React Native
Eric Deng
 
PDF
Switch to React.js from AngularJS developer
Eugene Zharkov
 
PDF
Introduction to ReactJS
Tu Hoang
 
PDF
An introduction to React.js
Emanuele DelBono
 
PPTX
React js
Oswald Campesato
 
PDF
Workshop React.js
Commit University
 
React JS - Introduction
Sergey Romaneko
 
React / Redux Architectures
Vinícius Ribeiro
 
Academy PRO: React JS. Redux & Tooling
Binary Studio
 
React & redux
Cédric Hartland
 
React JS and Redux
Glib Kechyn
 
React js
Jai Santhosh
 
Introduction to ReactJS
Hoang Long
 
Up and Running with ReactJS
Loc Nguyen
 
Getting started with Redux js
Citrix
 
React state managmenet with Redux
Vedran Blaženka
 
React for Dummies
Mitch Chen
 
An Introduction to ReactJS
All Things Open
 
Starting with Reactjs
Thinh VoXuan
 
20180518 QNAP Seminar - Introduction to React Native
Eric Deng
 
Switch to React.js from AngularJS developer
Eugene Zharkov
 
Introduction to ReactJS
Tu Hoang
 
An introduction to React.js
Emanuele DelBono
 
Workshop React.js
Commit University
 
Ad

Similar to Getting Started With ReactJS (20)

PPTX
React - Start learning today
Nitin Tyagi
 
PPTX
Dyanaimcs of business and economics unit 2
jpm071712
 
PPTX
Introduction to React JS for beginners
Varun Raj
 
PPTX
ReactJS presentation.pptx
DivyanshGupta922023
 
PDF
Introduction Web Development using ReactJS
ssuser8a1f37
 
PPTX
Build web apps with react js
dhanushkacnd
 
PPTX
Intro react js
Vijayakanth MP
 
PPTX
react-slides.pptx
DayNightGaMiNg
 
PPTX
ReactJS (1)
George Tony
 
PDF
Introduction to react
kiranabburi
 
PPTX
React, Flux and more (p1)
tuanpa206
 
PPTX
Combining Angular and React Together
Sebastian Pederiva
 
PPTX
ReactJS
Ram Murat Sharma
 
PDF
A React Journey
LinkMe Srl
 
PPTX
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
zmulani8
 
PDF
react-slides.pdf gives information about react library
janet736113
 
PDF
react-slides.pdf
DayNightGaMiNg
 
PPTX
TRAINING pptt efwoiefo weoifjoiewjfoifjow.pptx
PrathamSharma77833
 
PPTX
react-slidlkjfl;kj;dlkjopidfjhopijgpoerjpofjiwoepifjopweifjepoies.pptx
PrathamSharma77833
 
PDF
Corso su ReactJS
LinkMe Srl
 
React - Start learning today
Nitin Tyagi
 
Dyanaimcs of business and economics unit 2
jpm071712
 
Introduction to React JS for beginners
Varun Raj
 
ReactJS presentation.pptx
DivyanshGupta922023
 
Introduction Web Development using ReactJS
ssuser8a1f37
 
Build web apps with react js
dhanushkacnd
 
Intro react js
Vijayakanth MP
 
react-slides.pptx
DayNightGaMiNg
 
ReactJS (1)
George Tony
 
Introduction to react
kiranabburi
 
React, Flux and more (p1)
tuanpa206
 
Combining Angular and React Together
Sebastian Pederiva
 
A React Journey
LinkMe Srl
 
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
zmulani8
 
react-slides.pdf gives information about react library
janet736113
 
react-slides.pdf
DayNightGaMiNg
 
TRAINING pptt efwoiefo weoifjoiewjfoifjow.pptx
PrathamSharma77833
 
react-slidlkjfl;kj;dlkjopidfjhopijgpoerjpofjiwoepifjopweifjepoies.pptx
PrathamSharma77833
 
Corso su ReactJS
LinkMe Srl
 
Ad

Getting Started With ReactJS