diff --git a/change/react-native-windows-2019-12-12-16-22-29-instanceSettings.json b/change/react-native-windows-2019-12-12-16-22-29-instanceSettings.json new file mode 100644 index 00000000000..a7084eebcbf --- /dev/null +++ b/change/react-native-windows-2019-12-12-16-22-29-instanceSettings.json @@ -0,0 +1,8 @@ +{ + "type": "prerelease", + "comment": "Fix toggle debugger setting issue with ReactApplication", + "packageName": "react-native-windows", + "email": "dida@ntdev.microsoft.com", + "commit": "76228b95ceccaa87cc75563083415308805f914d", + "date": "2019-12-13T00:22:29.280Z" +} \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative/ReactInstanceCreator.h b/vnext/Microsoft.ReactNative/ReactInstanceCreator.h index 6a37c8123f2..94790d7a429 100644 --- a/vnext/Microsoft.ReactNative/ReactInstanceCreator.h +++ b/vnext/Microsoft.ReactNative/ReactInstanceCreator.h @@ -33,14 +33,13 @@ struct ReactInstanceCreator : react::uwp::IReactInstanceCreator { std::shared_ptr getInstance(); void markAsNeedsReload(); - // TODO: Remove this wart. AFAIK, it was only added for the - // Universal.SampleApp It's here because of the abstract base class. The - // ReactInstanceSettings in this project has a UseWebDebugger property - // that should be used instead as it automatically "persists" by virtue - // of being attached to the ReactNativeHost. - void persistUseWebDebugger(bool /*useWebDebugger*/){}; - // TODO: Remove too - void persistUseLiveReload(bool /*useliveReload*/){}; + void persistUseWebDebugger(bool useWebDebugger) { + m_instanceSettings.UseWebDebugger(useWebDebugger); + }; + + void persistUseLiveReload(bool useliveReload) { + m_instanceSettings.UseLiveReload(useliveReload); + }; private: Microsoft::ReactNative::ReactInstanceSettings m_instanceSettings{};