Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C create-react-app
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,547
    • Issues 1,547
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 417
    • Merge requests 417
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Meta
  • create-react-app
  • Merge requests
  • !9820

[v4] Fallback to full reload if React version doesn't support Fast Refresh

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/n3tr/fix-reload-when-fr-disabled into master Oct 17, 2020
  • Overview 5
  • Commits 1
  • Pipelines 0
  • Changes 3

Created by: n3tr

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.10.0)
  • Remove Fast Refresh warning on the older react version since we will automatically fallback to do full reload.

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
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/n3tr/fix-reload-when-fr-disabled