Skip to content
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

fix: Fallback to full reload if React version doesn't support Fast Refresh #9971

Closed

Conversation

n3tr
Copy link
Contributor

@n3tr n3tr commented Oct 31, 2020

fix #9807

Changes

Fallback to the full reload if React version doesn't support Fast Refresh

  • Overwrite FAST_REFRESH to false if the current react version doesn't support (< 16.9.0)
  • Remove Fast Refresh warning on the older react version since we will automatically fallback to do full reload.
  • Change the minimum supported version to 16.9.0 per react-refresh-webpack-plugin's prerequisites.

Verify steps

Default setup

  • 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

React version that Fast Refresh is unavailable (e.g. 15)

  • Change React version to 15.7.0
    • yarn add react@15.7.0 react-dom@15.7.0
    • Remove <React.StrictMode> from index.js
  • yarn start and
  • Modify App.js
  • The app should do a full reload

@stale
Copy link

stale bot commented Dec 19, 2020

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.

@stale stale bot added the stale label Dec 19, 2020
@stale
Copy link

stale bot commented Dec 25, 2020

This pull request has been automatically closed because it has not had any recent activity. If you have a question or comment, please open a new issue. Thank you for your contribution!

@stale stale bot closed this Dec 25, 2020
Sign up for free to 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.

[v4] Fast Refresh should not be enabled for old ReactDOM versions
2 participants