SlideShare a Scribd company logo
3
Most read
5
Most read
7
Most read
Understanding
What is Component?
Types of Components
What is component in reactjs
What is Component?
•Basic meaning of component is “one of several
parts of which something is made”
•In ReactJS one UI page is consists of so many
component(s).
•Components are independent and reusable
code. Building blocks of ReactJS Application.
What is Component?
•Components is like JavaScript functions, but work
individually to return JSX code as elements for UI.
•Parent Component is group of all child
components.
Types of Components
 Functional Components
 Class Components
 Pure Component
 High-Order Components
•Its like a function that takes in props and return JSX.
•JSX stands for JavaScript XML. It is simply a syntax
extension of JavaScript. JSX allows us to write HTML
in React.
•Functional component is also known as a stateless
component because not hold or manage state.
Functional Component
• Example: Hello.js
// Functional Component Example
import React from 'react';
function Hello(props){
return (
<h1>
Welcome to Learn {props.name}
</h1>
)
}
export default Hello;
Functional Component
• Example: HelloWorld.js
// Functional Component Example
import React from 'react';
const HelloWorld =()=> {
return (
<div>
<p>Hello World!</p>
</div>
)
}
export default HelloWorld;
Functional Component
•Declaring this component as Class type.
•Class components are child classes of
React.Component
Class Component
// Class Component Example
import React from 'react';
class ViewHelloWorld extends React.Component {
render() {
return (
<div>
<p>Hello World!</p>
</div>
)
}
}
export default ViewHelloWorld;
Class Component
What is component in reactjs

More Related Content

PDF
React js t2 - jsx
Jainul Musani
 
PDF
ReactJS presentation
Thanh Tuong
 
PDF
Lets make a better react form
Yao Nien Chung
 
PPTX
reactJS
Syam Santhosh
 
PPTX
React hooks
Assaf Gannon
 
PPTX
Introduction to react_js
MicroPyramid .
 
PPTX
Its time to React.js
Ritesh Mehrotra
 
PDF
React and redux
Mystic Coders, LLC
 
React js t2 - jsx
Jainul Musani
 
ReactJS presentation
Thanh Tuong
 
Lets make a better react form
Yao Nien Chung
 
reactJS
Syam Santhosh
 
React hooks
Assaf Gannon
 
Introduction to react_js
MicroPyramid .
 
Its time to React.js
Ritesh Mehrotra
 
React and redux
Mystic Coders, LLC
 

What's hot (20)

PPTX
Introduction to React JS for beginners
Varun Raj
 
PPTX
ReactJS
Ram Murat Sharma
 
PPTX
A Brief Introduction to React.js
Doug Neiner
 
PPTX
React hooks
Ramy ElBasyouni
 
PPTX
Intro to React
Justin Reock
 
PPTX
Introduction to React JS for beginners | Namespace IT
namespaceit
 
PPTX
Intro to React
Eric Westfall
 
PDF
Understanding react hooks
Samundra khatri
 
PPTX
ReactJs
Sahana Banerjee
 
ODP
Introduction to ReactJS
Knoldus Inc.
 
PDF
React js
Rajesh Kolla
 
PPTX
[Final] ReactJS presentation
洪 鹏发
 
PDF
An introduction to React.js
Emanuele DelBono
 
PDF
React Context API
NodeXperts
 
PPTX
Lab #2: Introduction to Javascript
Walid Ashraf
 
PDF
Basics of React Hooks.pptx.pdf
Knoldus Inc.
 
PDF
Introduction to Redux
Ignacio Martín
 
PPTX
Introduction to react and redux
Cuong Ho
 
PPTX
React-JS Component Life-cycle Methods
ANKUSH CHAVAN
 
PPTX
Understanding react hooks
Maulik Shah
 
Introduction to React JS for beginners
Varun Raj
 
A Brief Introduction to React.js
Doug Neiner
 
React hooks
Ramy ElBasyouni
 
Intro to React
Justin Reock
 
Introduction to React JS for beginners | Namespace IT
namespaceit
 
Intro to React
Eric Westfall
 
Understanding react hooks
Samundra khatri
 
Introduction to ReactJS
Knoldus Inc.
 
React js
Rajesh Kolla
 
[Final] ReactJS presentation
洪 鹏发
 
An introduction to React.js
Emanuele DelBono
 
React Context API
NodeXperts
 
Lab #2: Introduction to Javascript
Walid Ashraf
 
Basics of React Hooks.pptx.pdf
Knoldus Inc.
 
Introduction to Redux
Ignacio Martín
 
Introduction to react and redux
Cuong Ho
 
React-JS Component Life-cycle Methods
ANKUSH CHAVAN
 
Understanding react hooks
Maulik Shah
 
Ad

Similar to What is component in reactjs (20)

PPTX
what is functional component
manojbkalla
 
PPTX
What are the components in React?
BOSC Tech Labs
 
PPTX
React - Start learning today
Nitin Tyagi
 
PDF
unit 3_Adv WTAdvanced Web Tecg Design_HTML_CSS_JAVASCRIPT_AJAX_PPT.pdf
GauravDwivedi695361
 
PPTX
react-slides.pptx
DayNightGaMiNg
 
PDF
react-slides.pdf gives information about react library
janet736113
 
PDF
react-slides.pdf
DayNightGaMiNg
 
PPTX
Intro to React.js
Smita Prasad
 
PDF
Learn react by Etietop Demas
Etietop Demas
 
PPTX
TRAINING pptt efwoiefo weoifjoiewjfoifjow.pptx
PrathamSharma77833
 
PPTX
Introduction to React JS.pptx
SHAIKIRFAN715544
 
PPTX
GDSC NITS Presents Kickstart into ReactJS
Pratik Majumdar
 
PPTX
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
Karmanjay Verma
 
PPTX
react-slidlkjfl;kj;dlkjopidfjhopijgpoerjpofjiwoepifjopweifjepoies.pptx
PrathamSharma77833
 
PPTX
React
manii kanta
 
PPTX
thinking in react slides for students.pptx
AneesLarik1
 
PPTX
Introduction to ReactJS UI Web Dev .pptx
SHAIKIRFAN715544
 
PPTX
React JS: A Secret Preview
valuebound
 
PDF
React Interview Question PDF By ScholarHat
Scholarhat
 
what is functional component
manojbkalla
 
What are the components in React?
BOSC Tech Labs
 
React - Start learning today
Nitin Tyagi
 
unit 3_Adv WTAdvanced Web Tecg Design_HTML_CSS_JAVASCRIPT_AJAX_PPT.pdf
GauravDwivedi695361
 
react-slides.pptx
DayNightGaMiNg
 
react-slides.pdf gives information about react library
janet736113
 
react-slides.pdf
DayNightGaMiNg
 
Intro to React.js
Smita Prasad
 
Learn react by Etietop Demas
Etietop Demas
 
TRAINING pptt efwoiefo weoifjoiewjfoifjow.pptx
PrathamSharma77833
 
Introduction to React JS.pptx
SHAIKIRFAN715544
 
GDSC NITS Presents Kickstart into ReactJS
Pratik Majumdar
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
Karmanjay Verma
 
react-slidlkjfl;kj;dlkjopidfjhopijgpoerjpofjiwoepifjopweifjepoies.pptx
PrathamSharma77833
 
thinking in react slides for students.pptx
AneesLarik1
 
Introduction to ReactJS UI Web Dev .pptx
SHAIKIRFAN715544
 
React JS: A Secret Preview
valuebound
 
React Interview Question PDF By ScholarHat
Scholarhat
 
Ad

More from manojbkalla (18)

PPTX
VFP-Report-Copy-Data-Environment details
manojbkalla
 
PPTX
Generate HTML From DBF using Visual Foxpro
manojbkalla
 
PPTX
VFP Client Server Application Theory Understanding | How to create client ser...
manojbkalla
 
PPTX
VFP LocFile With Sql select query Command | Visual Foxpro locfile function wi...
manojbkalla
 
PPTX
VFP IDX vs CDX, Visual Foxpro Index IDX vs CDX
manojbkalla
 
PPTX
VFP9 Visual Foxpro Filter Commands to work faster with DBF
manojbkalla
 
PPTX
Visual Foxpro / vfp9 auto enable Scrollbar
manojbkalla
 
PPTX
09 Asp.Net MVC Data Validation.pptx
manojbkalla
 
PPTX
Dimension command VFP / Visual Foxpro
manojbkalla
 
PPTX
Visual Foxpro Array | VFP Array | What is array in visual foxpro
manojbkalla
 
PPTX
BC30290-Local-variable-cannot-have-the-same-name-as-the-function.pptx
manojbkalla
 
PPTX
BC30290-Local-variable-cannot-have-the-same-name-as-the-function.pptx
manojbkalla
 
PPTX
Error: WebForms UnobtrusiveValidationMode Requires a ScriptResourceMapping Fo...
manojbkalla
 
PPTX
Ember js installation and create sample project, EmberJS Version check
manojbkalla
 
PPTX
Visual Foxpro Vfp check internet connection
manojbkalla
 
PPTX
Vfp9 DBF file , dbf file limitation , field limitation in dbf file
manojbkalla
 
PPTX
Ternary operator in vb.net | ternary operator example vb.net | how to write t...
manojbkalla
 
PPTX
asp.net session management example | using session in asp.net C# | what is se...
manojbkalla
 
VFP-Report-Copy-Data-Environment details
manojbkalla
 
Generate HTML From DBF using Visual Foxpro
manojbkalla
 
VFP Client Server Application Theory Understanding | How to create client ser...
manojbkalla
 
VFP LocFile With Sql select query Command | Visual Foxpro locfile function wi...
manojbkalla
 
VFP IDX vs CDX, Visual Foxpro Index IDX vs CDX
manojbkalla
 
VFP9 Visual Foxpro Filter Commands to work faster with DBF
manojbkalla
 
Visual Foxpro / vfp9 auto enable Scrollbar
manojbkalla
 
09 Asp.Net MVC Data Validation.pptx
manojbkalla
 
Dimension command VFP / Visual Foxpro
manojbkalla
 
Visual Foxpro Array | VFP Array | What is array in visual foxpro
manojbkalla
 
BC30290-Local-variable-cannot-have-the-same-name-as-the-function.pptx
manojbkalla
 
BC30290-Local-variable-cannot-have-the-same-name-as-the-function.pptx
manojbkalla
 
Error: WebForms UnobtrusiveValidationMode Requires a ScriptResourceMapping Fo...
manojbkalla
 
Ember js installation and create sample project, EmberJS Version check
manojbkalla
 
Visual Foxpro Vfp check internet connection
manojbkalla
 
Vfp9 DBF file , dbf file limitation , field limitation in dbf file
manojbkalla
 
Ternary operator in vb.net | ternary operator example vb.net | how to write t...
manojbkalla
 
asp.net session management example | using session in asp.net C# | what is se...
manojbkalla
 

Recently uploaded (20)

PDF
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
PDF
Build Multi-agent using Agent Development Kit
FadyIbrahim23
 
PPTX
Why Use Open Source Reporting Tools for Business Intelligence.pptx
Varsha Nayak
 
PDF
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
PDF
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
PPTX
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
PDF
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PDF
Become an Agentblazer Champion Challenge
Dele Amefo
 
PPTX
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
PDF
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Hironori Washizaki
 
PDF
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
PDF
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
PDF
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PDF
Exploring AI Agents in Process Industries
amoreira6
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PDF
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
QAware GmbH
 
PPTX
oapresentation.pptx
mehatdhavalrajubhai
 
PDF
Why Use Open Source Reporting Tools for Business Intelligence.pdf
Varsha Nayak
 
ShowUs: Pharo Stream Deck (ESUG 2025, Gdansk)
ESUG
 
Build Multi-agent using Agent Development Kit
FadyIbrahim23
 
Why Use Open Source Reporting Tools for Business Intelligence.pptx
Varsha Nayak
 
49784907924775488180_LRN2959_Data_Pump_23ai.pdf
Abilash868456
 
Become an Agentblazer Champion Challenge Kickoff
Dele Amefo
 
Contractor Management Platform and Software Solution for Compliance
SHEQ Network Limited
 
Salesforce Implementation Services Provider.pdf
VALiNTRY360
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
Become an Agentblazer Champion Challenge
Dele Amefo
 
Web Testing.pptx528278vshbuqffqhhqiwnwuq
studylike474
 
IEEE-CS Tech Predictions, SWEBOK and Quantum Software: Towards Q-SWEBOK
Hironori Washizaki
 
Key Features to Look for in Arizona App Development Services
Net-Craft.com
 
Teaching Reproducibility and Embracing Variability: From Floating-Point Exper...
University of Rennes, INSA Rennes, Inria/IRISA, CNRS
 
What to consider before purchasing Microsoft 365 Business Premium_PDF.pdf
Q-Advise
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Exploring AI Agents in Process Industries
amoreira6
 
Activate_Methodology_Summary presentatio
annapureddyn
 
QAware_Mario-Leander_Reimer_Architecting and Building a K8s-based AI Platform...
QAware GmbH
 
oapresentation.pptx
mehatdhavalrajubhai
 
Why Use Open Source Reporting Tools for Business Intelligence.pdf
Varsha Nayak
 

What is component in reactjs

  • 3. What is Component? •Basic meaning of component is “one of several parts of which something is made” •In ReactJS one UI page is consists of so many component(s). •Components are independent and reusable code. Building blocks of ReactJS Application.
  • 4. What is Component? •Components is like JavaScript functions, but work individually to return JSX code as elements for UI. •Parent Component is group of all child components.
  • 5. Types of Components  Functional Components  Class Components  Pure Component  High-Order Components
  • 6. •Its like a function that takes in props and return JSX. •JSX stands for JavaScript XML. It is simply a syntax extension of JavaScript. JSX allows us to write HTML in React. •Functional component is also known as a stateless component because not hold or manage state. Functional Component
  • 7. • Example: Hello.js // Functional Component Example import React from 'react'; function Hello(props){ return ( <h1> Welcome to Learn {props.name} </h1> ) } export default Hello; Functional Component
  • 8. • Example: HelloWorld.js // Functional Component Example import React from 'react'; const HelloWorld =()=> { return ( <div> <p>Hello World!</p> </div> ) } export default HelloWorld; Functional Component
  • 9. •Declaring this component as Class type. •Class components are child classes of React.Component Class Component
  • 10. // Class Component Example import React from 'react'; class ViewHelloWorld extends React.Component { render() { return ( <div> <p>Hello World!</p> </div> ) } } export default ViewHelloWorld; Class Component