create functional component react

JavaScript
import React from 'react'; const App = () => {  const greeting = 'Hello Function Component!';   return <Headline value={greeting} />;}; const Headline = ({ value }) =>  <h1>{value}</h1>; export default App;class Welcome extends React.Component {
  render() {
    return <h1>Hello, {this.props.name}</h1>;
  }
}const component = () => {
console.log("This is a functional Component");
}
Source

Also in JavaScript: