create function in function component code example Example: react function component Click to copyfunction Welcome(props) { return <h1>Hello, {props.name}</h1>; }