If you have bootstrapped the react app using
npx create-react-app my-app then you would probably want your browser to refresh every time you make changes to your file.
You could do this by adding .env file in root of your project, and add FAST_REFRESH=true.
This is it! You can now easily make changes and see those being reflected in real time on browser.
For advance configuration, this link is recommended https://create-react-app.dev/docs/advanced-configuration/