Skip to content

Commit

Permalink
bump react-refresh to latest (#39486)
Browse files Browse the repository at this point in the history
Summary:
- Companion PR to facebook/metro#1085
- The Fast Refresh changes appear to be required for using static rendering and React DOM. In frameworks like Expo Router which support both native and web, this causes users to not be able to use Fast Refresh on web.

## Changelog:

[GENERAL] [CHANGED] - Upgrade React Refresh package from 0.4.0 to 0.14.0

Pull Request resolved: #39486

Test Plan:
1. In a React Native project's `package.json`:
```json
 "resolutions": {
    "react-refresh": "~0.14.0"
  },
```
2. Start the server with a clear Metro cache.
3. Changes should update while preserving React state.

Reviewed By: huntie

Differential Revision: D49348078

Pulled By: robhogan

fbshipit-source-id: ac3dcb096c35c6c29c6e6a919cf263559bceaa7c
  • Loading branch information
EvanBacon authored and facebook-github-bot committed Sep 24, 2023
1 parent 0d23ef5 commit 030663b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/react-native-babel-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@babel/template": "^7.0.0",
"@react-native/babel-plugin-codegen": "*",
"babel-plugin-transform-flow-enums": "^0.0.2",
"react-refresh": "^0.4.0"
"react-refresh": "^0.14.0"
},
"peerDependencies": {
"@babel/core": "*"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
"pretty-format": "^26.5.2",
"promise": "^8.3.0",
"react-devtools-core": "^4.27.7",
"react-refresh": "^0.4.0",
"react-refresh": "^0.14.0",
"react-shallow-renderer": "^16.15.0",
"regenerator-runtime": "^0.13.2",
"scheduler": "0.24.0-canary-efb381bbf-20230505",
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8016,6 +8016,11 @@ react-is@^17.0.1:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==

react-refresh@^0.14.0:
version "0.14.0"
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.0.tgz#4e02825378a5f227079554d4284889354e5f553e"
integrity sha512-wViHqhAd8OHeLS/IRMJjTSDHF3U9eWi62F/MledQGPdJGDhodXJ9PBLNGr6WWL7qlH12Mt3TyTpbS+hGXMjCzQ==

react-refresh@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.4.0.tgz#d421f9bd65e0e4b9822a399f14ac56bda9c92292"
Expand Down

0 comments on commit 030663b

Please sign in to comment.