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