Questions tagged [react-refresh]
11 questions
11
votes
3 answers
Compilation error due to (non-existant) import of react-refresh
We are currently working on a tiny app which just renders an external React component (external since it's npm installed). The purpose of this app is to just fetch some JSON configuration and pass that as prop to that component to demonstrate its…

Newlukai
- 549
- 5
- 16
4
votes
0 answers
How to use react-refresh?
There is no much info about new react-refresh, and I'd like to start using it. There is no information about how to migrate from react-hot-reload.

Misiur
- 5,019
- 8
- 38
- 54
2
votes
1 answer
'SocketClient is not a constructor' in react-refresh-webpack-plugin
I have a typescript react project where I try to add the react-refresh-webpack-client and get this error:
my webpack config:
import HtmlWebpackPlugin from 'html-webpack-plugin';
import UglifyJsPlugin from 'uglifyjs-webpack-plugin';
import…

Omer Dital
- 73
- 4
2
votes
0 answers
Basic hot reloading with webpack 5 not working properly
Issues
It is loading the entire page
Operating System: macOS Big Sur 11.2
Node Version: v14.15.4
NPM Version: 6.14.10
webpack Version: ^5.19.0
webpack-dev-server Version: ^4.0.0-beta.0
Browser: Google Chrome Version 88
[x] This is a…

ridermansb
- 10,779
- 24
- 115
- 226
1
vote
3 answers
React state from props that doesn't update (even doing destructuring and using different keys)
Sorry for the long question in advance but I have been struggling with this for some time
To give some context of what I am trying to accomplish I am loading this table when my app loads
And when I click the button inside red square will bring the…

LuisEnMarroquin
- 1,609
- 1
- 14
- 26
1
vote
1 answer
How can I exclude React Refresh from the Create-React-App production build?
Uncaught Error: React Refresh runtime should not be included in the production bundle.
By default, when you do a npm run build, it changes the environment to 'production'. After looking at react-refresh, if the environment is in production, it…

DDT
- 395
- 3
- 14
1
vote
0 answers
React Hot Module Reload refresh when nothing updated
I'm using https://github.com/pmmmwh/react-refresh-webpack-plugin and it works good with react components. But sometimes I update a code that is not about a component directly and then I only see a message [HMR] Nothing hot updated in a console. To…

Márius Rak
- 1,356
- 2
- 15
- 35
1
vote
1 answer
Snowpack & React: hot reloading / refreshing not working
I use React with Snowpack and the react-refresh plugin.
After a change, the snowpack dev server recompiles correctly and the browser receives an HMR update signal - but the content is not reloaded, the changes are only visible after manual reloading…

stoniemahonie
- 321
- 1
- 5
- 13
0
votes
0 answers
How do I fix React Refresh?
I'm building a React app and I keep getting the same errors that I just can't fix:
Module not found: Error: You attempted to import server/reactweb/node_modules/react-refresh/runtime.js which falls outside of the project src/ directory. Relative…

Grant Lingerfelt
- 11
- 1
0
votes
0 answers
react-refresh: OriginalFactory is undefined | Cannot read properties of undefined (reading 'call')
While trying to use moduleFederationPlugin from webpack, we are getting below error:
` Cannot read properties of undefined (reading 'call')
originalFactory.call(this, moduleObject, moduleExports, webpackRequire);`
Its seems to be an issue with…
0
votes
1 answer
Is there a way of printing on the browser console when React Fast Refresh finishes refreshing?
I tried to search here/Google/GitHub but I'm not even sure of how to look for this. No matter what words I use they will always show me results of how to implement HMR. But that's not my issue. I just want to print on the browser console when the…

italodeandra
- 316
- 3
- 13