function Welcome(props) {
        return <h1>Hello, {props.name}</h1>;
      }
      class Welcome extends React.Component {
        render() {
          return <h1>Hello, {this.props.name}</h1>;
        }
      }

      Javascript language logoReact Props

      The code in the function Welcome renders a h1 tag with the name prop set to the value of this.props.name.

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.