The development server created by WebpackDevServer will also create a listener for changes in your JavaScript file. When you make changes and save your JavaScript file, the development server will recompile your code and quickly refresh the browser.
However, it is not created for production. Unfortunately, devs have been using it for all their projects. CRA limits your ability to change any configurations, it has tons of unneeded dependencies, you can't customize configurations, you can't build microfrontends …
By default, Create React App produces a build assuming your app is hosted at the server root. This will let Create React App correctly infer the root path to use in the generated HTML file. Note: If you are using react-router@^4 , you can root <Link> s using the basename prop on any <Router> .
npx itself is a Node tool which allows you to run a package, in this case with Create React App, which allows you to easily start a new React project. The server that you see is simply to allow for the reloading of the app in response to file changes in real time. The server is only for use in development.
If you are using Chrome, this might be connected to webpack-dev-server
(which create-react-app uses under the hood) issue described here.
Since this has been already addressed by create-react-app team,
check the latest available version of react-scripts
here: changelog, bump the react-scripts
version in your package.json
to match it and run npm install
(or yarn install
) in your project's folder to update to the latest version.
I bumped into this when the page was trying to render a huge load of data. Paginated the table and everything worked fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With