Uh oh!
There was an error while loading. Please reload this page.
[v4] Fallback to full reload if React version doesn't support Fast Refresh - #9820
Closed
n3tr wants to merge 1 commit into
Closed
[v4] Fallback to full reload if React version doesn't support Fast Refresh#9820n3tr wants to merge 1 commit into
n3tr wants to merge 1 commit into
Conversation
n3tr
requested review from
ianschmitz, iansu, mrmckeb and petetnt
as code ownersOctober 17, 2020 08:22
- Remove FR warning for older react version
n3trforce-pushed
the
fix-reload-when-fr-disabled
branch
from
October 22, 2020 15:40
a806e97 to
0d63f72Compareianschmitz
commented
Oct 26, 2020
Contributor
We took a different approach in #9861 by attempting to import Thanks for the PR! |
ContributorAuthor
@ianschmitz I think this one is different from #9861, as I understand, #9861 is about This is more about detecting if the React version supports Fast Refresh or not, otherwise, it will fall back to full reload. |
ianschmitz
commented
Oct 27, 2020
Contributor
Ah, apologies I confused the two. |
n3tr
commented
Oct 27, 2020
ContributorAuthor
@ianschmitz Dun worry! 😄 Should I create another PR for this or just leave it here? |
n3tr
commented
Oct 31, 2020
ContributorAuthor
I moved to #9971 since this has duplicated fixes with others, and I have messed up this branch. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Fallback to the full reload if React version doesn't support Fast Refresh
FAST_REFRESHtofalseif the current react version doesn't support (<16.10.0)Verify steps
Default setup
yarn create-react-app my-appyarn startApp.jscontentFAST_REFRESH=falseFAST_REFRESH=false yarn startApp.jsReact version that Fast Refresh is unavailable (e.g. 15)
15.7.0yarn add react@15.7.0 react-dom@15.7.0<React.StrictMode>fromindex.jsyarn startandApp.js