Skip to content

Commit

Permalink
Enable by default
Browse files Browse the repository at this point in the history
Summary:
This enables Fast Refresh by default.

More concretely:

* For clean installs, it's enabled by default. (You can opt out at any time via the dev menu.)

* For updated DEV apps (on device or simulator), it flips from disabled to enabled **but only if you never touched the setting before**.

* If you previously explicitly enabled and/or later disabled it, we keep your previous setting.

Reviewed By: yungsters

Differential Revision: D16442656

fbshipit-source-id: 1bfe0bf4bcf2830284f9c757fbfacc10db92acb4
  • Loading branch information
gaearon authored and facebook-github-bot committed Jul 24, 2019
1 parent fbd5dee commit 17f8e58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions React/Modules/RCTDevSettings.mm
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ - (instancetype)init
// default behavior is to use NSUserDefaults
NSDictionary *defaultValues = @{
kRCTDevSettingShakeToShowDevMenu: @YES,
kRCTDevSettingHotLoadingEnabled: @YES,
};
RCTDevSettingsUserDefaultsDataSource *dataSource = [[RCTDevSettingsUserDefaultsDataSource alloc] initWithDefaultValues:defaultValues];
return [self initWithDataSource:dataSource];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin
}

public boolean isHotModuleReplacementEnabled() {
return mPreferences.getBoolean(PREFS_HOT_MODULE_REPLACEMENT_KEY, false);
return mPreferences.getBoolean(PREFS_HOT_MODULE_REPLACEMENT_KEY, true);
}

public void setHotModuleReplacementEnabled(boolean enabled) {
Expand Down

0 comments on commit 17f8e58

Please sign in to comment.