'React page do not refresh as i change my app.js

I am new to react as today is my day 2, I create react app using "npx create-react-app" bt when I make changes in the file like app.js. it does not reflect on the page, even I tried to refresh the page by going in the browser and refresh it, that also not working ( my node version is 16.13.1 and npm is 8.1.2)

  import logo from "./logo.svg";
  import "./App.css";

function App() {
    return (
        <div className="App">
            <header className="App-header">
                <img src={logo} className="App-logo" alt="logo" />
                <p>
                    Edit <code>src/App.js</code> and save to reload.
                </p>
                <a
                    className="App-link"
                    href="https://reactjs.org"
                    target="_blank"
                    rel="noopener noreferrer"
                >
                    Learn React is again not working with nik
                </a>
            </header>
        </div>
    );
}

 

package.json 
{
  "name": "hy",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^5.16.2",
    "@testing-library/react": "^12.1.3",
    "@testing-library/user-event": "^13.5.0",
    "react": "^17.0.2",
    "react-dom": "^17.0.2",
    "react-scripts": "5.0.0",
    "web-vitals": "^2.1.4"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": [
      "react-app",
      "react-app/jest"
    ]
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  }
}

and I'm currently using windows 11



Solution 1:[1]

Make sure you've saved your changes. I see you are using vs code, you can enable auto save by pressing ctrl & , and searching for auto save. I recommend setting it to onFocusChange.

Also as @Mahipal mentioned in the comments, make sure you are making the changes in the correct workspace.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jalal