So I'm working with React for the first time and for some reason when nodemon is running and I'm editting code, whenever I type anything, VS code automatically tabs over to the browser which is obviously not the behavior I want. I've used nodemon before but never noticed this and it's pretty disruptive. Not sure exactly if this is the issue, but is there any way to prevent VS code/nodemon from auto-tabbing to browser upon change detection?
You can add Browser=none
in your start script
"scripts": {
"start": "BROWSER=none react-scripts start"
},
The browser is getting opened by default create-react-app
config, every time nodemon restarts that process it opens the browser. Though you shouldn't need to use nodemon here anyways because react detects changes on its own to refresh the opened instance.
ref: https://coderrocketfuel.com/article/stop-create-react-app-from-opening-a-browser-window-on-start