high level components react

JavaScript
import React, { useState } from 'react';

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

function HighHookWelcome() {
  const [name ,setName] = useState("Default Name Here");
  return(
    <WelcomeName
      name={name}
    />
  );
}

// Note: Didn't need to use state for a static value.
// Minimal example, just to illustrate passing state/props.
// setName is a function to change the name value.
Source

Also in JavaScript: