functionnal component react code example
Example 1: react class component
class Welcome extends React.Component {
render() {
return <h1>Bonjour, {this.props.name}</h1>;
}
}
Example 2: react function component
function Welcome(props) {
return <h1>Hello, {props.name}</h1>;
}