ReactJS documentation provides an exelent explanation on how to get started with this framework by creating a single-page app.
npx create-react-app map
Here, I wanted to demonstrate how to add a Map component to the app by using OpenLayers.
Install OpenLayers with
npm install ol --save