-
-
Notifications
You must be signed in to change notification settings - Fork 26.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fast Refresh #9913
Comments
I set // from
const hasReactRefresh = process.env.FAST_REFRESH !== 'false';
// to
const hasReactRefresh = process.env.FAST_REFRESH !== false; on line 246 of |
@obsius so you can set |
That didn't work for me, it's always a boolean by that point, probably because of this: // Whether or not react-refresh is enabled.
// react-refresh is not 100% stable at this time,
// which is why it's disabled by default.
// It is defined here so it is available in the webpackHotDevClient.
FAST_REFRESH: process.env.FAST_REFRESH !== 'false', in |
I'm having trouble refreshing the app at all, adding and removing components does nothing, only the styles update when changed. Edit:
in babel presets, solved the issue. Now the app reloads properly. |
@perinazzoo I don't know why so many people believe it's enabled by default, in fact fast refresh is NOT enabled by default!
|
The comment might say that, but if I don't set FAST_REFRESH as an env variable, it ends up as undefined which evaluates in that line to true. |
@obsius so that's a bug then? |
Perhaps, else the comment is outdated? |
Yes, the comment is probably outdated (per #9350) |
@RosenTomov when you say 'babel presets', what file are referring to? I'd like to try this fix myself. |
When i update App.tsx component code, it usually updates page with latest changes, but sometimes it doesn't. When i change css, it picks up update nicely. But when i change any code oitside of css or components, browser console displays all new warnings, indicating it receiver new code, but the page doesn't reload and changes don't apply. In all cases code recompiles, so it's not watcher problem. |
👆 Second this. Pretty much the same issue here 😕 |
+1 setting FAST_REFRESH=false to the .env doesn't help In addition: Fast Refresh re/compilation time in CRA 4 TS 4 project is very very very slow... UPD. It's slow due to eslint cache missing in webpack dev config, should be fixed in the CRA 4.0.1 - https://github.com/facebook/create-react-app/milestone/78 |
@redders6600 Yes, I rolled back to |
@redders6600 They released react-scripts version 4.0.1 recently and fixed issue, now |
Doesn't work for me even with |
This is a problem with inotify, which observes file system events, individual files or directories, in linux of course. The help would be:
|
Now, fast refresh is enabled by default on CRA, but is there any way to turn this off and use hot reload instead?
The text was updated successfully, but these errors were encountered: