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

PPTX
Introduction to React JS
PPTX
React JS - A quick introduction tutorial
PPTX
React workshop
PDF
An introduction to React.js
PPTX
Introduction to React JS for beginners | Namespace IT
PPTX
Reactjs
PPTX
Servlets
Introduction to React JS
React JS - A quick introduction tutorial
React workshop
An introduction to React.js
Introduction to React JS for beginners | Namespace IT
Reactjs
Servlets

What's hot (20)

PDF
JavaScript - Chapter 12 - Document Object Model
PPT
Spring Framework
ODP
Introduction to ReactJS
PPTX
Lab #2: Introduction to Javascript
PPTX
Introduction to React JS for beginners
PDF
PPTX
[Final] ReactJS presentation
PDF
Understanding react hooks
PPTX
React hooks
PDF
JavaScript - Chapter 8 - Objects
PPTX
Its time to React.js
PPTX
React js for beginners
PPTX
React + Redux Introduction
PPTX
PPTX
Intro to React
PPTX
Introduction to spring boot
PDF
Basics of React Hooks.pptx.pdf
PPTX
Introduction to Spring Framework
PPTX
React Hooks
PDF
Java Training | Java Tutorial for Beginners | Java Programming | Java Certifi...
JavaScript - Chapter 12 - Document Object Model
Spring Framework
Introduction to ReactJS
Lab #2: Introduction to Javascript
Introduction to React JS for beginners
[Final] ReactJS presentation
Understanding react hooks
React hooks
JavaScript - Chapter 8 - Objects
Its time to React.js
React js for beginners
React + Redux Introduction
Intro to React
Introduction to spring boot
Basics of React Hooks.pptx.pdf
Introduction to Spring Framework
React Hooks
Java Training | Java Tutorial for Beginners | Java Programming | Java Certifi...
Ad

Similar to What is component in reactjs (20)

PPTX
what is functional component
PPTX
ReactJS_Components_Presentation for freshers
PPTX
What are the components in React?
PDF
How to create components in ReactJS_.pdf
PPTX
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
PDF
React JS Components fully detailedOverview.pdf
PPTX
Introduction to ReactJS UI Web Dev .pptx
PPTX
React - Start learning today
PDF
Copy of React_JS_Notes.pdf
PDF
unit 3_Adv WTAdvanced Web Tecg Design_HTML_CSS_JAVASCRIPT_AJAX_PPT.pdf
PPTX
Introduction to React JS.pptx
PPTX
thinking in react slides for students.pptx
PPTX
Presentation on "An Introduction to ReactJS"
PPTX
React Class Components vs Functional Components: Which is Better?
PPTX
Dyanaimcs of business and economics unit 2
PDF
React Interview Question & Answers PDF By ScholarHat
PDF
Fundamental concepts of react js
DOCX
React Components and Its Importance.docx
PDF
React Component
what is functional component
ReactJS_Components_Presentation for freshers
What are the components in React?
How to create components in ReactJS_.pdf
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS Components fully detailedOverview.pdf
Introduction to ReactJS UI Web Dev .pptx
React - Start learning today
Copy of React_JS_Notes.pdf
unit 3_Adv WTAdvanced Web Tecg Design_HTML_CSS_JAVASCRIPT_AJAX_PPT.pdf
Introduction to React JS.pptx
thinking in react slides for students.pptx
Presentation on "An Introduction to ReactJS"
React Class Components vs Functional Components: Which is Better?
Dyanaimcs of business and economics unit 2
React Interview Question & Answers PDF By ScholarHat
Fundamental concepts of react js
React Components and Its Importance.docx
React Component
Ad

More from manojbkalla (18)

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

Recently uploaded (20)

PDF
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
PDF
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
DOCX
How to Use SharePoint as an ISO-Compliant Document Management System
PDF
Wondershare Recoverit Full Crack New Version (Latest 2025)
PDF
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PDF
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PDF
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
PPTX
Cybersecurity: Protecting the Digital World
PPTX
Advanced SystemCare Ultimate Crack + Portable (2025)
PDF
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
PPTX
most interesting chapter in the world ppt
PDF
Microsoft Office 365 Crack Download Free
PDF
Guide to Food Delivery App Development.pdf
PPTX
Computer Software - Technology and Livelihood Education
PDF
CCleaner 6.39.11548 Crack 2025 License Key
PPTX
Airline CRS | Airline CRS Systems | CRS System
PDF
iTop VPN Crack Latest Version Full Key 2025
PDF
AI Guide for Business Growth - Arna Softech
DuckDuckGo Private Browser Premium APK for Android Crack Latest 2025
AI/ML Infra Meetup | Beyond S3's Basics: Architecting for AI-Native Data Access
How to Use SharePoint as an ISO-Compliant Document Management System
Wondershare Recoverit Full Crack New Version (Latest 2025)
Top 10 Software Development Trends to Watch in 2025 🚀.pdf
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
novaPDF Pro 11.9.482 Crack + License Key [Latest 2025]
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
The Dynamic Duo Transforming Financial Accounting Systems Through Modern Expe...
Cybersecurity: Protecting the Digital World
Advanced SystemCare Ultimate Crack + Portable (2025)
Introduction to Ragic - #1 No Code Tool For Digitalizing Your Business Proces...
most interesting chapter in the world ppt
Microsoft Office 365 Crack Download Free
Guide to Food Delivery App Development.pdf
Computer Software - Technology and Livelihood Education
CCleaner 6.39.11548 Crack 2025 License Key
Airline CRS | Airline CRS Systems | CRS System
iTop VPN Crack Latest Version Full Key 2025
AI Guide for Business Growth - Arna Softech

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