What are Props in React?

What are props in React?

import React from "react";import Tool from "./Tool";const Example = () => {return (<><div className="app"><Tool name="Ateev" /></div></>);};export default Example;
import React from "react";const Tool = (props) => {return (<div className="bg-dark text-white"><h1 className="px-5 pt-5">My name is {props.name}.</h1><p className="fs-5 px-5 pb-5">I am a front-end developer.</p></div>);};export default Tool;

--

--

--

I am a front-end developer from India with over one year of experience in freelancing with skills like Git, HTML5, CSS3, Bootstrap 4&5, and React.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Rearranging NODE — A decade later, DENO aims to evolve on an industry standard.

How to Host React App with NGINX

Single page application (SPA) website development vs multi-page websites

Naming Convention in Angular

Getting Started with Cypress e2e Testing in Angular

Algorithmic Stock Trading Using Node.js

Promise v/s Observable in Angular

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ateev Duggal

Ateev Duggal

I am a front-end developer from India with over one year of experience in freelancing with skills like Git, HTML5, CSS3, Bootstrap 4&5, and React.

More from Medium

How to make a table in React with Hooks

Day6 - #100DaysOfCode - Finish React, Start Redux

React.JS Series: What is JSX? And why do we need it?

Context vs. Composition in React