Hot Module Replacement not working with React (reloads the page)
See original GitHub issue- Laravel Mix Version: 1.0.7
- Node Version (
node -v
): v8.1.2 - NPM Version (
npm -v
): 5.0.3 - OS: Mac 10.12
Description:
Trying to enable this, however it reloads the page whenever the JS is recompiled. Is this supposed to work out of the box?
Steps To Reproduce:
- Clone https://github.com/morrislaptop/laravel54-react
- Run npm install
- Run npm run hot
- Load website in browswer
- Make a change to resources/assets/js/components/Example.js
- Observe browser reloads instead of HMR
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Hot Reload is not working in my React App - Stack Overflow
Hot Reload is not working in my React App · This does happen sometimes. Do npm install and try adding some code. ·...
Read more >Hot Reload stopped working with React "^17.0.1" · Issue #9904
I'm having trouble refreshing the app at all, adding or removing components does nothing, I have to manually refresh the page to get...
Read more >Getting Started · React Hot Loader - Dan gaearon
Step 1 (of 3): Enabling Hot Module Replacement (HMR). HMR allows us to replace modules in-place without restarting the server. Here's how you...
Read more >react-hot-loader - npm
Hot reloading code is just one line in the beginning and one line at the end of each module so you might not...
Read more >Enabling hot reload in React web app | by Dong Chen - Medium
Hot reload allows developers to see result of code change in browser without page refresh. ... This is the most confusing part as...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve had this issue before which was fixed by adding this lines at the end of my root react js file:
it also works if I put it in
resources/assets/js/app.js
[Laravel 5.4 Environment]This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.