how to give prop react 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')
);