SlideShare a Scribd company logo
React
What is React?
React is a JavaScript library created by Facebook.
It lets you compose complex UIs from small and isolated pieces of code called “components”.
React allows us to create reusable UI components.
What are React Components?
Components are like functions that return HTML elements.
Components are independent and reusable bits of code.
They serve the same purpose as JavaScript functions, but work in isolation and returns HTML
via a render function
 Components come in two types, Class components and Function components.
Class Component
When creating a React component, the component's name must start with an upper case
letter.
Class component has to include the extends React.Component statement, this statement
creates an inheritance to React.Component
 component also requires a render() method, this method returns HTML.
Example:
class Greet extends React.Component {
render () {
return <h1> Hi, Good Morning</h1>
}
}
Function Component
Function component also returns HTML, and behaves pretty much the same way as a Class
component.
Functional component is just like a plain JavaScript function.
Functional component doesn’t require render() method, and extends React.Component
Functional component are much easier to read and test because they are plain JavaScript
functions without state or lifecycle-hooks
Example:
function Greet () {
return <h1> Hi, Good Morning</h1>
}
React Props:
React Props are like function arguments in JavaScript and attributes in HTML.
To send props into a component, use the same syntax as HTML attributes.
Props are also how you pass data from one component to another, as parameters.
If you have a variable to send you just put the variable name inside curly brackets.
React Props are read-only! You will get an error if you try to change their value.
Example:
const myelement = <Car brand = “Ford” />;
React 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.
The state object is initialized in the constructor and it can contain as many properties as you
like.
Refer to the state object anywhere in the component by using the this.state.propertyname.
To change a value in the state object, use the this.setState() method.
Always use setState() method to change the state object, it will ensure that the component
knows its been updated and calls the render() method
Pros and Cons of ReactJs:
Pros:
 ReactJS is much easier to learn and use.
 Creating Dynamic Web Applications Becomes Easier, It provides less coding and gives more
functionality.
 The reusable components helps to make your apps easier to develop and maintain.
Cons:
 ReactJS Covers only the UI Layers of the application and nothing else. So need some other
technologies to get a complete tooling set for development in the project.
React

More Related Content

DOCX
Oracle EBS R 12 Core hr user manual
PDF
Otl Oracle Time and Labor
DOC
Oracle ebs otl setup document
PPT
Oracle HRMS Payroll Table Overview
DOCX
Check element entry value on particular effective date
PDF
Oracle hrms bg setup examples
DOCX
Oracle HRMS Fast Formula
DOCX
Absence management in oracle HRMS
Oracle EBS R 12 Core hr user manual
Otl Oracle Time and Labor
Oracle ebs otl setup document
Oracle HRMS Payroll Table Overview
Check element entry value on particular effective date
Oracle hrms bg setup examples
Oracle HRMS Fast Formula
Absence management in oracle HRMS

What's hot (20)

PPTX
Oracle EBS Apps HRMS Presentation
PDF
Oracle Fusion Cloud HCM Payroll Query
PPTX
Report Manager in Oracle EBS R12
PPTX
Oracle HRMS R12 business applications Overview
PDF
Ame how to diagnose issues with the default approver list in purchasing when ...
DOC
AME Requisition Approval Heirarchy
PDF
Oaf personaliztion examples
PDF
Payroll costing details Oracle Fusion Cloud HCM
PDF
Query all roles and duties and privileges Oracle Fusion Cloud
PDF
Oracle forms personalization
DOCX
Oracle Personalization How To Restricting users from assigning items to diffe...
PDF
Introduction to Spring Framework
DOC
Training Guide Oracle EBS R12 Performance Management
PDF
Hire employee in Oracle Fusion Cloud HCM
PPTX
Payroll process in oracle hrms
PDF
Collections Api - Java
DOC
Oracle EBS R12 Self service user manual
DOCX
Prevent merging columns in excel output using rtf template
PPT
Hrms for beginners
PDF
JUnit & Mockito, first steps
Oracle EBS Apps HRMS Presentation
Oracle Fusion Cloud HCM Payroll Query
Report Manager in Oracle EBS R12
Oracle HRMS R12 business applications Overview
Ame how to diagnose issues with the default approver list in purchasing when ...
AME Requisition Approval Heirarchy
Oaf personaliztion examples
Payroll costing details Oracle Fusion Cloud HCM
Query all roles and duties and privileges Oracle Fusion Cloud
Oracle forms personalization
Oracle Personalization How To Restricting users from assigning items to diffe...
Introduction to Spring Framework
Training Guide Oracle EBS R12 Performance Management
Hire employee in Oracle Fusion Cloud HCM
Payroll process in oracle hrms
Collections Api - Java
Oracle EBS R12 Self service user manual
Prevent merging columns in excel output using rtf template
Hrms for beginners
JUnit & Mockito, first steps
Ad

Similar to React (20)

PPTX
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
PDF
React Interview Question & Answers PDF By ScholarHat
PPTX
Introduction to ReactJS UI Web Dev .pptx
PPTX
Introduction to React JS.pptx
PPTX
Unit 2 Fundamentals of React -------.pptx
PPTX
React for JavaScipt Introduction and functions
PPTX
React JS - A quick introduction tutorial
PDF
Fundamental concepts of react js
PDF
react hook and wesite making structure ppt
PPTX
React_Complete.pptx
PPTX
Reactjs notes.pptx for web development- tutorial and theory
PPTX
React Workshop: Core concepts of react
PPTX
PDF
Getting Started with React, When You’re an Angular Developer
PPTX
2.React tttttttttttttttttttttttttttttttt
PPTX
PDF
Fundamental Concepts of React JS for Beginners.pdf
PPTX
Presentation on "An Introduction to ReactJS"
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React Interview Question & Answers PDF By ScholarHat
Introduction to ReactJS UI Web Dev .pptx
Introduction to React JS.pptx
Unit 2 Fundamentals of React -------.pptx
React for JavaScipt Introduction and functions
React JS - A quick introduction tutorial
Fundamental concepts of react js
react hook and wesite making structure ppt
React_Complete.pptx
Reactjs notes.pptx for web development- tutorial and theory
React Workshop: Core concepts of react
Getting Started with React, When You’re an Angular Developer
2.React tttttttttttttttttttttttttttttttt
Fundamental Concepts of React JS for Beginners.pdf
Presentation on "An Introduction to ReactJS"
Ad

Recently uploaded (20)

PPTX
Materi_Pemrograman_Komputer-Looping.pptx
PPTX
L1 - Introduction to python Backend.pptx
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
Digital Strategies for Manufacturing Companies
PPT
JAVA ppt tutorial basics to learn java programming
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PPTX
Online Work Permit System for Fast Permit Processing
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
ai tools demonstartion for schools and inter college
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
history of c programming in notes for students .pptx
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Materi_Pemrograman_Komputer-Looping.pptx
L1 - Introduction to python Backend.pptx
How to Migrate SBCGlobal Email to Yahoo Easily
Digital Strategies for Manufacturing Companies
JAVA ppt tutorial basics to learn java programming
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Online Work Permit System for Fast Permit Processing
Design an Analysis of Algorithms I-SECS-1021-03
PTS Company Brochure 2025 (1).pdf.......
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Understanding Forklifts - TECH EHS Solution
Upgrade and Innovation Strategies for SAP ERP Customers
ai tools demonstartion for schools and inter college
VVF-Customer-Presentation2025-Ver1.9.pptx
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
history of c programming in notes for students .pptx
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
2025 Textile ERP Trends: SAP, Odoo & Oracle
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free

React

  • 2. What is React? React is a JavaScript library created by Facebook. It lets you compose complex UIs from small and isolated pieces of code called “components”. React allows us to create reusable UI components.
  • 3. What are React Components? Components are like functions that return HTML elements. Components are independent and reusable bits of code. They serve the same purpose as JavaScript functions, but work in isolation and returns HTML via a render function  Components come in two types, Class components and Function components.
  • 4. Class Component When creating a React component, the component's name must start with an upper case letter. Class component has to include the extends React.Component statement, this statement creates an inheritance to React.Component  component also requires a render() method, this method returns HTML. Example: class Greet extends React.Component { render () { return <h1> Hi, Good Morning</h1> } }
  • 5. Function Component Function component also returns HTML, and behaves pretty much the same way as a Class component. Functional component is just like a plain JavaScript function. Functional component doesn’t require render() method, and extends React.Component Functional component are much easier to read and test because they are plain JavaScript functions without state or lifecycle-hooks Example: function Greet () { return <h1> Hi, Good Morning</h1> }
  • 6. React Props: React Props are like function arguments in JavaScript and attributes in HTML. To send props into a component, use the same syntax as HTML attributes. Props are also how you pass data from one component to another, as parameters. If you have a variable to send you just put the variable name inside curly brackets. React Props are read-only! You will get an error if you try to change their value. Example: const myelement = <Car brand = “Ford” />;
  • 7. React 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. The state object is initialized in the constructor and it can contain as many properties as you like. Refer to the state object anywhere in the component by using the this.state.propertyname. To change a value in the state object, use the this.setState() method. Always use setState() method to change the state object, it will ensure that the component knows its been updated and calls the render() method
  • 8. Pros and Cons of ReactJs: Pros:  ReactJS is much easier to learn and use.  Creating Dynamic Web Applications Becomes Easier, It provides less coding and gives more functionality.  The reusable components helps to make your apps easier to develop and maintain. Cons:  ReactJS Covers only the UI Layers of the application and nothing else. So need some other technologies to get a complete tooling set for development in the project.