I generated react application using npx create-react-app my-app
everything works fine in my local machine and I used npm start and hot reload works.
but when I started to use this application in docker container I missed hot reloading feature
using following command I created docker container and mounted volume on it:
docker run -p 3000:3000 -v "$(pwd):/var/www" -w "/var/www" node npm start
react app comes up and works properly but after changing code it does not affect on this project.
See CHOKIDAR_USEPOLLING as suggested by our troubleshooting guide.
Setting CHOKIDAR_USEPOLLING to true sent my docker CPU usage through the roof.
Enabling "warm reloading" was enough for my needs (reloads the browser when a file changes, but loses state).
You'll need to expose port 35729, if you're interested see https://www.peterbe.com/plog/how-to-create-react-app-with-docker.
Most helpful comment
See
CHOKIDAR_USEPOLLINGas suggested by our troubleshooting guide.