If you want hot reloading and server side rendering etc. The best approach for react is nextjs.
Clone This Repo for the fast approach!
Create new directory
mkdir fooChange into the directory and run the following commands
cd foo
npm install yarn -g
yarn init -y
yarn add next react react-dom
npm install json -g
json -I -f package.json -e 'this.scripts = { "start": "next start", "build": "next build", "dev": "next"}'
mkdir pages
echo 'export default () => <h1>Hello Next</h1>' > pages/index.js
yarn devThis will install next and react and you can run your react app, using yarn dev, which includes hot module reloading and server side rendering.
Do your development
Deploy to Now
npm install now -g
now