prop.this in react code example
Example 1: props in react
function Welcome(props) {
return Hello, {props.name}
;
}
function App() {
return (
);
}
ReactDOM.render(
,
document.getElementById('root')
);
Example 2: props react
function Welcome(props) { return Hello, {props.name}
;
}
const element = ;ReactDOM.render(
element,
document.getElementById('root')
);