question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fast-Refresh doesn't work for example using-preact

See original GitHub issue

Bug report

Describe the bug

When using the example using-preact to create a new project, the Fast-Refresh doesn’t work as expected.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Create a next.js project from using-preact-example: yarn create next-app --example using-preact using-preact-app
  2. Run the dev server yarn dev
  3. Change any text inside pages/index.js and save
  4. The page shows the previous code and does not change the text

Expected behavior

On changing any text inside JSX elements it should reflect on development environment.

System information

  • OS: Manjaro Linux(Kernel 5.4.x)
  • Browser: Firefox Developer Edition
  • Version of Next.js: 9.4.4
  • Version of Node.js: 12.17.0

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:5
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

16reactions
developitcommented, Jun 9, 2020

I’ve opened #13976 to update the using-preact example so that it matches the latest version from nextjs-preact-demo including @JoviDeCroock’s fix. We’re likely going to publish a dedicated Next.js Preact plugin since the configuration here is nontrivial.

7reactions
06kellyjaccommented, Nov 2, 2020

I’ve got a setup based on the preact example and fast refresh seems to be working but I still get this annoying warning:

warn - Fast Refresh is disabled in your application due to an outdated react version. Please upgrade 16.10 or newer! Read more: https://err.sh/next.js/react-version Do I need to just get over it 😅 or is this something you’d be open to removing/fixing/rewording?

Read more comments on GitHub >

github_iconTop Results From Across the Web

React fast refresh doesn't work · Issue #161 · callstack/repack
I'm using a completely fresh react native project and the example webpack config. Every time I change a file the app does a...
Read more >
Create react app, reload not working - Stack Overflow
I had this issue in react ^17.0.2 I fixed it by adding a .env file and setting FAST_REFRESH=false . Just create a .env...
Read more >
Basic Features: Fast Refresh - Next.js
Next.js' Fast Refresh is a new hot reloading experience that gives you instantaneous feedback on edits made to your React components.
Read more >
react-refresh - npm
Fast Refresh is a feature that lets you edit React components in a running application without losing their state.
Read more >
React v18.0 – React Blog
React may start rendering an update, pause in the middle, then continue later. It may even abandon an in-progress render altogether. React ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found