SlideShare a Scribd company logo
Learn React.js
with me!
@KIPROSH
By Shivani Thakur
Guess what it is???
Still thinking?? Ok then Guess this...
Still not sure…. Guess this one !
JSX => SIMPLE
JSX is easy and simple to read and
understand :)
React.DOM => Complicated
React.DOM end up getting
complicated as more & more nodes
gets added it ….
It’s nothing but JSX Vs React.DOM !!
DO BELIEVE ME :(
Then Check
This Out
React.DOM Sample
BirthDayRow = React.createClass({
render: function() {
return DOM.div({className: 'row', id: "bday-row1"},
DOM.div({className: 'columns'}, "How to make things
complicated"),
DOM.div({className: 'columns'},
DOM.div({className: 'row'},
DOM.div({className: 'columns'},"Hi"),
DOM.div({className: 'columns'}, "Complicated!")
)))}});
JSX lets us create JavaScript objects using HTML syntax. So it is easy to write.
var BirthDayRow = React.createClass({
render: function(){
<div id='bday-row1' className='row'>
<div className='columns'>How to make things COMPLICATED => SIMPLE</div>
<div className='columns'>
<div className='row'>
<div className='columns'>Hi</div>
<div className='columns'>Simple!</div>
</div>
</div>
</div>} });
JSX Sample
Life is REALLY simple :) and if you
really want to keep it simple then
use => “ JSX ”
But if you insist to make it
complicated then use=> “
React.DOM ”
Wisdom Quote :)
Component is nothing but a function which
takes input params as "Props" and "State".
Using these input parameters it will render a
dynamic HTML
*NOTE - Main limitation of the component is,
"Render single node" only. If you return multiple
nodes that will not be render. You have to wrap
multiple nodes into single node
Component
Immutable => An immutable object is an object
whose state cannot be modified after it is created.
"Props" (properties) is immutable within the
component.
Mutable => Mutable object is an object which can
be modified after it is
created.
Immutable - Mutable
Once component is there we would like to
have some interactions in component. And
for that React introduces “State”. State is
private to “Component” and can change it by
calling “this.setState”
e.g. when I click button and want to show a
message i.e. an interaction
State
Inputs to the component are called as props
(properties) and we pass them as attribute in
JSX or React.DOM
Props are passed from the parent and are
"owned" by the parent.
Property
Start Learning!

More Related Content

PDF
Introduction to React
PDF
Connection Database
ODP
Appetite comes with testing
ODP
Object Oriented Prograring(OOP) java
PDF
Appetite comes with testing
PDF
Appetite comes with testing
PDF
Is Flexbox the Future of Layout -bdconf
PDF
Learning React - I
Introduction to React
Connection Database
Appetite comes with testing
Object Oriented Prograring(OOP) java
Appetite comes with testing
Appetite comes with testing
Is Flexbox the Future of Layout -bdconf
Learning React - I

Similar to Learn react.js with me! (20)

PPTX
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
PDF
unit 3_Adv WTAdvanced Web Tecg Design_HTML_CSS_JAVASCRIPT_AJAX_PPT.pdf
PPTX
Dyanaimcs of business and economics unit 2
PDF
Welcome to React & Flux !
PDF
ReactJS - A quick introduction to Awesomeness
PPTX
React & Redux for noobs
PDF
Workshop 19: ReactJS Introduction
PPTX
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
PDF
react hook and wesite making structure ppt
PPTX
Unit 2 Fundamentals of React -------.pptx
PDF
React Interview Question PDF By ScholarHat
PPTX
React Workshop
PDF
ReactJS for Programmers
PDF
React && React Native workshop
PPTX
ReactJS Code Impact
PPTX
React workshop
PPTX
thinking in react slides for students.pptx
PDF
React for Dummies
PDF
Learn react by Etietop Demas
PPTX
React Workshop: Core concepts of react
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
unit 3_Adv WTAdvanced Web Tecg Design_HTML_CSS_JAVASCRIPT_AJAX_PPT.pdf
Dyanaimcs of business and economics unit 2
Welcome to React & Flux !
ReactJS - A quick introduction to Awesomeness
React & Redux for noobs
Workshop 19: ReactJS Introduction
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
react hook and wesite making structure ppt
Unit 2 Fundamentals of React -------.pptx
React Interview Question PDF By ScholarHat
React Workshop
ReactJS for Programmers
React && React Native workshop
ReactJS Code Impact
React workshop
thinking in react slides for students.pptx
React for Dummies
Learn react by Etietop Demas
React Workshop: Core concepts of react
Ad

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
MYSQL Presentation for SQL database connectivity
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Approach and Philosophy of On baking technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Machine Learning_overview_presentation.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Encapsulation theory and applications.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
A Presentation on Artificial Intelligence
20250228 LYD VKU AI Blended-Learning.pptx
The AUB Centre for AI in Media Proposal.docx
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
MYSQL Presentation for SQL database connectivity
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Chapter 3 Spatial Domain Image Processing.pdf
MIND Revenue Release Quarter 2 2025 Press Release
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Approach and Philosophy of On baking technology
“AI and Expert System Decision Support & Business Intelligence Systems”
Digital-Transformation-Roadmap-for-Companies.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Encapsulation_ Review paper, used for researhc scholars
Machine Learning_overview_presentation.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Encapsulation theory and applications.pdf
Machine learning based COVID-19 study performance prediction
A Presentation on Artificial Intelligence
Ad

Learn react.js with me!

  • 3. Still thinking?? Ok then Guess this...
  • 4. Still not sure…. Guess this one !
  • 5. JSX => SIMPLE JSX is easy and simple to read and understand :) React.DOM => Complicated React.DOM end up getting complicated as more & more nodes gets added it …. It’s nothing but JSX Vs React.DOM !!
  • 6. DO BELIEVE ME :( Then Check This Out
  • 7. React.DOM Sample BirthDayRow = React.createClass({ render: function() { return DOM.div({className: 'row', id: "bday-row1"}, DOM.div({className: 'columns'}, "How to make things complicated"), DOM.div({className: 'columns'}, DOM.div({className: 'row'}, DOM.div({className: 'columns'},"Hi"), DOM.div({className: 'columns'}, "Complicated!") )))}});
  • 8. JSX lets us create JavaScript objects using HTML syntax. So it is easy to write. var BirthDayRow = React.createClass({ render: function(){ <div id='bday-row1' className='row'> <div className='columns'>How to make things COMPLICATED => SIMPLE</div> <div className='columns'> <div className='row'> <div className='columns'>Hi</div> <div className='columns'>Simple!</div> </div> </div> </div>} }); JSX Sample
  • 9. Life is REALLY simple :) and if you really want to keep it simple then use => “ JSX ” But if you insist to make it complicated then use=> “ React.DOM ” Wisdom Quote :)
  • 10. Component is nothing but a function which takes input params as "Props" and "State". Using these input parameters it will render a dynamic HTML *NOTE - Main limitation of the component is, "Render single node" only. If you return multiple nodes that will not be render. You have to wrap multiple nodes into single node Component
  • 11. Immutable => An immutable object is an object whose state cannot be modified after it is created. "Props" (properties) is immutable within the component. Mutable => Mutable object is an object which can be modified after it is created. Immutable - Mutable
  • 12. Once component is there we would like to have some interactions in component. And for that React introduces “State”. State is private to “Component” and can change it by calling “this.setState” e.g. when I click button and want to show a message i.e. an interaction State
  • 13. Inputs to the component are called as props (properties) and we pass them as attribute in JSX or React.DOM Props are passed from the parent and are "owned" by the parent. Property