how to use props in functional components reactjs code example
Example 1: function component with props
import React from "react"
function Checkbox(props){
return (
<div>
<input type="checkbox" />
<label>{props.value}</label>
</div>
)
}
export default Checkbox
Example 2: How to acces props of a functional component
const Child = (props) => { return ( <div style={{backgroundColor: props.eyeColor}} /> )}