react functional component passing props code example
Example: defining props in react
function Welcome(props) {
return Hello, {props.name}
;
}
const element = ;
ReactDOM.render(
element,
document.getElementById('root')
);
function Welcome(props) {
return Hello, {props.name}
;
}
const element = ;
ReactDOM.render(
element,
document.getElementById('root')
);