Subscribe Us

React Props | React JS | Dark Watcher

 

React Props

Props are arguments passed to React components via HTML attributes. Example: 

Component:

function Cat(props) {
  return <h1>Meow's color is {props.color}</h1>;
}

Main file: 

<Cat color="purple" />

Output:

Post a Comment

0 Comments