Reputation: 4918
In recent react app I install nodemon
globally and modified package.json to add dev command like this:
"scripts": {
"start": "react-scripts start",
"dev": "nodemon ./app.js",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
I start the app like this npm run dev
but problem in any changes the development server start again opening new tab. How I make only current tab refreshed ?
Upvotes: 0
Views: 525
Reputation: 1985
Why not simply use npm start
?
react-scripts start
sets up the development environment and starts a server, as well as hot module reloading. Read more here.
Upvotes: 2