Html & Html5

The World's best Software Development Study Portal


Props in react js are use to control data in the components. Props are used to pass down the data in child components. Props are immutable, use to pass data down in view controller. Lets implement props in our previous file Greet.js.

import React from 'react'
const Greet= (props)=> {
return< h4 > hello { props.name } < h4 > } export default Greet;

Now go inside App.js include Welcome Components in the App Components.

import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import Greet from './components/Greet'
import Welcome from './components/Welcome'
class App extends Component {
render() {
return (

< Greet name="parveen" />
< Greet name="arveen" />
< Greet name="rveen" />

export default App;

Output - Parveen