SlideShare a Scribd company logo
2
Most read
3
Most read
9
Most read
React js
Prepared by Alireza Akbari
What is React js
 created by Jordan Walke
 In old days we only used JavaScript for change font size and color (like
jquery)
 React is a JavaScript library created by Facebook 2013.
 React is a JavaScript library for building user interfaces.
 React is used to build single page applications.
 React allows us to create reusable UI components.
How does react work?
 It’s used for handling view layer for web and mobile apps
 React creates a VIRTUAL DOM (document object model) in memory.
 High speed in processing
 You can write react in two ways:
 you can write React code directly in HTML.
 in order to use React in production, you need NPM and Node.js installed.
React in html
React in NPM
1. Install NPM and nodejs
2. Type in terminal: “npm install -g create-react-app”
3. npx create-react-app myfirstreact
4. cd myfirstreact
5. npm start
What is JSX
 React use JSX (javascript xml)
 JSX allows us to write HTML in React.
 Babel Convert JSx to javascript
 JSX is an extension of the JavaScript language based on ES6, and is translated
into regular JavaScript at runtime.
 With JSX you can write expressions inside curly braces { }
 The HTML code must be wrapped in ONE top level element.
 JSX follows XML rules, and therefore HTML elements must be properly closed.

What is component
 Components are independent and reusable bits of code.
 Components are like functions that returns HTML elements.
 Components come in two types:
 Class components
 Function components
 the component's name must start with an upper case letter.
 The component has to include the extend React.Component statement
 The component also requires a render() method, this method returns HTML.
Props
 Props are arguments passed into React components.
 Props are passed to components via HTML attributes.
 React Props are like function arguments in JavaScript and attributes in HTML.
 Note: React Props are read-only! You will get an error if you try to change
their value.

state
React components has a built-in state object.
The state object is where you store property values that belongs to the
component.
When the state object changes, the component re-renders.
Refer to the state object anywhere in the component by
using the this.state.propertyname syntax:
To change a value in the state object, use the
this.setState() method.

More Related Content

PPTX
PPTX
React js programming concept
PPTX
Introduction to React
PDF
An introduction to React.js
PPTX
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
PPTX
React web development
PPTX
Its time to React.js
ODP
Introduction to ReactJS
React js programming concept
Introduction to React
An introduction to React.js
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React web development
Its time to React.js
Introduction to ReactJS

What's hot (20)

PPTX
React js
PPTX
React js - The Core Concepts
PDF
React js
PPTX
Introduction to react_js
PPTX
reactJS
PPTX
React js for beginners
PPTX
Reactjs
PPTX
Intro to React
PPTX
Introduction to React JS for beginners
PDF
WEB DEVELOPMENT USING REACT JS
PPTX
React JS - A quick introduction tutorial
PDF
Introduction to Redux
PPT
React js
PDF
React JS - Introduction
PPTX
PPTX
Introduction to React JS for beginners | Namespace IT
PPTX
[Final] ReactJS presentation
PPTX
React workshop
PDF
ReactJS presentation
PDF
React Js Simplified
React js
React js - The Core Concepts
React js
Introduction to react_js
reactJS
React js for beginners
Reactjs
Intro to React
Introduction to React JS for beginners
WEB DEVELOPMENT USING REACT JS
React JS - A quick introduction tutorial
Introduction to Redux
React js
React JS - Introduction
Introduction to React JS for beginners | Namespace IT
[Final] ReactJS presentation
React workshop
ReactJS presentation
React Js Simplified
Ad

Similar to React js (20)

PPTX
Unit 2 Fundamentals of React -------.pptx
PDF
Learn react by Etietop Demas
PPTX
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
PPTX
ReactJS.pptx
PPTX
Reactjs notes.pptx for web development- tutorial and theory
PDF
Welcome to React & Flux !
PPTX
reacts js with basic details Detailed_ReactJS_Presentation.pptx
PPTX
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
PPTX
React_Complete.pptx
PPTX
ReactJS (1)
PDF
Full Stack React Workshop [CSSC x GDSC]
PPTX
PDF
unit 3_Adv WTAdvanced Web Tecg Design_HTML_CSS_JAVASCRIPT_AJAX_PPT.pdf
PDF
Review on React JS
PDF
react hook and wesite making structure ppt
PDF
react.pdf
PDF
0900 learning-react
PDF
Learning React js Learn React JS From Scratch with Hands On Projects 2nd Edit...
PPTX
Internal workshop react-js-mruiz
Unit 2 Fundamentals of React -------.pptx
Learn react by Etietop Demas
unit 2 React js.pptxdgdgdgdgdgdgdgdgdsgdgdg
ReactJS.pptx
Reactjs notes.pptx for web development- tutorial and theory
Welcome to React & Flux !
reacts js with basic details Detailed_ReactJS_Presentation.pptx
Internet and Web Technology (CLASS-9) [React.js] | NIC/NIELIT Web Technology
React_Complete.pptx
ReactJS (1)
Full Stack React Workshop [CSSC x GDSC]
unit 3_Adv WTAdvanced Web Tecg Design_HTML_CSS_JAVASCRIPT_AJAX_PPT.pdf
Review on React JS
react hook and wesite making structure ppt
react.pdf
0900 learning-react
Learning React js Learn React JS From Scratch with Hands On Projects 2nd Edit...
Internal workshop react-js-mruiz
Ad

Recently uploaded (20)

PDF
Modernizing your data center with Dell and AMD
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Advanced IT Governance
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Approach and Philosophy of On baking technology
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
KodekX | Application Modernization Development
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Empathic Computing: Creating Shared Understanding
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Network Security Unit 5.pdf for BCA BBA.
Modernizing your data center with Dell and AMD
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Advanced IT Governance
Dropbox Q2 2025 Financial Results & Investor Presentation
Approach and Philosophy of On baking technology
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
The AUB Centre for AI in Media Proposal.docx
CIFDAQ's Market Insight: SEC Turns Pro Crypto
KodekX | Application Modernization Development
Understanding_Digital_Forensics_Presentation.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Empathic Computing: Creating Shared Understanding
Per capita expenditure prediction using model stacking based on satellite ima...
NewMind AI Weekly Chronicles - August'25 Week I
Advanced methodologies resolving dimensionality complications for autism neur...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Network Security Unit 5.pdf for BCA BBA.

React js

  • 1. React js Prepared by Alireza Akbari
  • 2. What is React js  created by Jordan Walke  In old days we only used JavaScript for change font size and color (like jquery)  React is a JavaScript library created by Facebook 2013.  React is a JavaScript library for building user interfaces.  React is used to build single page applications.  React allows us to create reusable UI components.
  • 3. How does react work?  It’s used for handling view layer for web and mobile apps  React creates a VIRTUAL DOM (document object model) in memory.  High speed in processing  You can write react in two ways:  you can write React code directly in HTML.  in order to use React in production, you need NPM and Node.js installed.
  • 5. React in NPM 1. Install NPM and nodejs 2. Type in terminal: “npm install -g create-react-app” 3. npx create-react-app myfirstreact 4. cd myfirstreact 5. npm start
  • 6. What is JSX  React use JSX (javascript xml)  JSX allows us to write HTML in React.  Babel Convert JSx to javascript  JSX is an extension of the JavaScript language based on ES6, and is translated into regular JavaScript at runtime.  With JSX you can write expressions inside curly braces { }  The HTML code must be wrapped in ONE top level element.  JSX follows XML rules, and therefore HTML elements must be properly closed. 
  • 7. What is component  Components are independent and reusable bits of code.  Components are like functions that returns HTML elements.  Components come in two types:  Class components  Function components  the component's name must start with an upper case letter.  The component has to include the extend React.Component statement  The component also requires a render() method, this method returns HTML.
  • 8. Props  Props are arguments passed into React components.  Props are passed to components via HTML attributes.  React Props are like function arguments in JavaScript and attributes in HTML.  Note: React Props are read-only! You will get an error if you try to change their value. 
  • 9. state React components has a built-in state object. The state object is where you store property values that belongs to the component. When the state object changes, the component re-renders. Refer to the state object anywhere in the component by using the this.state.propertyname syntax: To change a value in the state object, use the this.setState() method.