Menu

1 / 2

What is Components in React

DEV Community·mohandass·6 months ago
#PNNSQKk2
#beginners#javascript#react#webdev#button
Reading 0:00
15s threshold

1. What is Components in React ?

A react, Components are the independent and reusable building block Used to create user interfaces(UI) . They Function similarly to JavaScript functions but operate in isolation To return JSX (JavaScript XML) , which describes what should appear on The screen. You build small parts Separately then combine them to create a full website or app.

Examples:

Button

Navbar

Card

Footer

Product Box

Login From

Each of these can be a separate React component.

Simple Example

Normal HTML like:

<button>welcome!</button>

React Component

function Button () { return < button > Welcome!…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.