diff --git a/Libraries/Core/setUpReactRefresh.js b/Libraries/Core/setUpReactRefresh.js index b723c5c1414..463123ee822 100644 --- a/Libraries/Core/setUpReactRefresh.js +++ b/Libraries/Core/setUpReactRefresh.js @@ -22,11 +22,6 @@ if (__DEV__) { ReactRefreshRuntime.injectIntoGlobalHook(global); const Refresh = { - // This can be set from the app as a workaround - // if you really want a full reload on every change: - // if (__DEV__) require.Refresh.forceFullRefresh = true; - forceFullRefresh: false, - performFullRefresh() { NativeDevSettings.reload(); }, @@ -40,13 +35,7 @@ if (__DEV__) { register: ReactRefreshRuntime.register, - performReactRefresh() { - if (Refresh.forceFullRefresh) { - NativeDevSettings.reload(); - } else { - ReactRefreshRuntime.performReactRefresh(); - } - }, + performReactRefresh: ReactRefreshRuntime.performReactRefresh, }; (require: any).Refresh = Refresh; diff --git a/Libraries/Utilities/HMRClient.js b/Libraries/Utilities/HMRClient.js index f50daab4d6a..1acd228eb3d 100644 --- a/Libraries/Utilities/HMRClient.js +++ b/Libraries/Utilities/HMRClient.js @@ -148,10 +148,7 @@ Error: ${e.message}`; // Until we get "connection-done", messages aren't real edits. didFinishInitialUpdate && // If HMR is disabled by the user, we're ignoring updates. - client.shouldApplyUpdates && - // If full refresh is forced, there's no need to flash the indicator. - // It will be refreshed in a few milliseconds anyway. - !(require: any).Refresh.forceFullRefresh + client.shouldApplyUpdates ); } diff --git a/React/DevSupport/RCTDevMenu.m b/React/DevSupport/RCTDevMenu.m index 6a653b8a552..4b7e9fcaede 100644 --- a/React/DevSupport/RCTDevMenu.m +++ b/React/DevSupport/RCTDevMenu.m @@ -286,17 +286,8 @@ RCT_EXPORT_MODULE() devSettings.isProfilingEnabled = !devSettings.isProfilingEnabled; } }]]; - // "Live reload" which refreshes on every edit was removed in favor of "Fast Refresh". // While native code for "Live reload" is still there, please don't add the option back. - // - // If for some reason you really need a full reload on every edit, - // you can put this into your application entry point as an escape hatch: - // - // if (__DEV__) { - // require.Refresh.forceFullRefresh = true; - // } - // // See D15958697 for more context. } diff --git a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerImpl.java b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerImpl.java index fcbddf92e46..07d88559218 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerImpl.java +++ b/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerImpl.java @@ -507,19 +507,9 @@ public class DevSupportManagerImpl mReactInstanceManagerHelper.toggleElementInspector(); } }); - // "Live reload" which refreshes on every edit was removed in favor of "Fast Refresh". // While native code for "Live reload" is still there, please don't add the option back. - // - // If for some reason you really need a full reload on every edit, - // you can put this into your application entry point as an escape hatch: - // - // if (__DEV__) { - // require.Refresh.forceFullRefresh = true; - // } - // // See D15958697 for more context. - options.put( mDevSettings.isHotModuleReplacementEnabled() ? mApplicationContext.getString(R.string.catalyst_hot_reloading_stop)