File tree Expand file tree Collapse file tree 4 files changed +28
-0
lines changed
packages/playground/windows/playground-win32
vnext/Microsoft.ReactNative Expand file tree Collapse file tree 4 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,7 @@ struct WindowData {
8585
8686 winrt::Microsoft::ReactNative::ReactNativeHost Host () noexcept {
8787 if (!m_host) {
88+ winrt::Microsoft::ReactNative::QuirkSettings::SetUseFusebox (true );
8889 m_host = winrt::Microsoft::ReactNative::ReactNativeHost ();
8990 m_host.InstanceSettings (InstanceSettings ());
9091 }
Original file line number Diff line number Diff line change 99#include " React.h"
1010#include " ReactPropertyBag.h"
1111
12+ #include < react/featureflags/ReactNativeFeatureFlags.h>
13+ #include < react/featureflags/ReactNativeFeatureFlagsDefaults.h>
14+
1215namespace winrt ::Microsoft::ReactNative::implementation {
1316
1417QuirkSettings::QuirkSettings () noexcept {}
1518
19+
20+ class QuirkSettingsReactNativeFeatureFlags
21+ : public facebook::react::ReactNativeFeatureFlagsDefaults {
22+ public:
23+ QuirkSettingsReactNativeFeatureFlags (bool enableModernCDPRegistry) : m_enableModernCDPRegistry(enableModernCDPRegistry) {}
24+
25+ bool inspectorEnableModernCDPRegistry () override {
26+ return m_enableModernCDPRegistry;
27+ }
28+ private:
29+ bool m_enableModernCDPRegistry;
30+ };
31+
1632winrt::Microsoft::ReactNative::ReactPropertyId<bool > MatchAndroidAndIOSStretchBehaviorProperty () noexcept {
1733 static winrt::Microsoft::ReactNative::ReactPropertyId<bool > propId{
1834 L" ReactNative.QuirkSettings" , L" MatchAndroidAndIOSyStretchBehavior" };
@@ -137,6 +153,10 @@ winrt::Microsoft::ReactNative::ReactPropertyId<bool> IsBridgelessProperty() noex
137153 ReactPropertyBag (settings.Properties ()).Set (UseRuntimeSchedulerProperty (), value);
138154}
139155
156+ /* static*/ void QuirkSettings::SetUseFusebox (bool value) noexcept {
157+ facebook::react::ReactNativeFeatureFlags::override (std::make_unique<QuirkSettingsReactNativeFeatureFlags>(value));
158+ }
159+
140160#pragma endregion IDL interface
141161
142162/* static*/ bool QuirkSettings::GetMatchAndroidAndIOSStretchBehavior (ReactPropertyBag properties) noexcept {
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ struct QuirkSettings : QuirkSettingsT<QuirkSettings> {
6868 winrt::Microsoft::ReactNative::ReactInstanceSettings settings,
6969 bool value) noexcept ;
7070
71+ static void SetUseFusebox (bool value) noexcept ;
72+
7173#pragma endregion Public API - part of IDL interface
7274};
7375
Original file line number Diff line number Diff line change @@ -64,6 +64,11 @@ namespace Microsoft.ReactNative
6464 "By default `react-native-windows` will use the new RuntimeScheduler."
6565 "Setting this to false will revert the behavior to previous scheduling logic.")
6666 static void SetUseRuntimeScheduler(ReactInstanceSettings settings, Boolean value);
67+
68+ DOC_STRING(
69+ "By default `react-native-windows` uses the legacy inspector packager connection protocol."
70+ "Setting this to true to enable the modern \"Fusebox\" debugging functionality.")
71+ static void SetUseFusebox(Boolean value);
6772 }
6873
6974} // namespace Microsoft.ReactNative
You can’t perform that action at this time.
0 commit comments