Add reloadWithReason to DevSettings

Summary:
This diff adds reloadWithReason to the NativeDevSettings and updates the exposed DevSettings.reload method to send to it if it's available (setting an 'uncategorized' reason if one isn't set.

[General][Feature] Update DevSettings.reload to accept a reason

Reviewed By: RSNara

Differential Revision: D17499343

fbshipit-source-id: e8c9724800f93d3b9a5d2a8fe9f689d51947d39b
This commit is contained in:
Rick Hanlon
2019-09-30 07:03:50 -07:00
committed by Facebook Github Bot
parent 2ccc8fbc28
commit 549cac63cb
5 changed files with 23 additions and 2 deletions
@@ -52,6 +52,11 @@ public class DevSettingsModule extends ReactContextBaseJavaModule {
}
}
@ReactMethod
public void reloadWithReason(String reason) {
this.reload();
}
@ReactMethod
public void setHotLoadingEnabled(boolean isHotLoadingEnabled) {
mDevSupportManager.setHotModuleReplacementEnabled(isHotLoadingEnabled);