Functional Components in React:
we use functional components in order to make the elements reusable. The elements to be rendered are written inside a function and pass the function as the argument inside the ReactDOM.render() method.
It is better to practice to create a file MyInfo.js inside the Components folder and move the function to the file.
Then import the MyInfo.js file to Index.js