Skip to content

fix: page doesn't get refreshed when FAST_REFRESH=false - #9884

Merged
ianschmitz merged 2 commits into
react:masterfrom
n3tr:fix-non-fast-refresh-reload
Oct 26, 2020
Merged

fix: page doesn't get refreshed when FAST_REFRESH=false#9884
ianschmitz merged 2 commits into
react:masterfrom
n3tr:fix-non-fast-refresh-reload

Conversation

@n3tr

@n3trn3tr commented Oct 24, 2020

Copy link
Copy Markdown
Contributor

Page doesn't get refreshed when disabling FAST_REFRESH. This is because the process.env.FAST_REFRESH in webpackHotDevClient is a boolean value, comparing !== 'false' will always return true.

Verify steps

  • yarn create-react-app my-app
  • yarn start
  • Modify App.js content
  • The app gets updated through Fast Refresh

FAST_REFRESH=false

  • Start the app by using FAST_REFRESH=false yarn start
  • Modify App.js
  • The app should do a full reload

@ianschmitzianschmitz changed the title [v4] Fix page doesn't get refreshed when FAST_REFRESH=falsefix: page doesn't get refreshed when FAST_REFRESH=falseOct 26, 2020
@ianschmitz
ianschmitz merged commit 7e48117 into react:masterOct 26, 2020
@ianschmitz

Copy link
Copy Markdown
Contributor

Great find. Thanks!

wombleton pushed a commit to AurorNZ/create-react-app that referenced this pull request Jun 1, 2021
Co-authored-by: Ian Schmitz <ianschmitz@gmail.com>
abhiisheek pushed a commit to abhiisheek/create-react-app that referenced this pull request May 19, 2023
Co-authored-by: Ian Schmitz <ianschmitz@gmail.com>
abhiisheek pushed a commit to abhiisheek/create-react-app that referenced this pull request May 24, 2023
Co-authored-by: Ian Schmitz <ianschmitz@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@n3tr@ianschmitz@facebook-github-bot