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 {
85
85
86
86
winrt::Microsoft::ReactNative::ReactNativeHost Host () noexcept {
87
87
if (!m_host) {
88
+ winrt::Microsoft::ReactNative::QuirkSettings::SetUseFusebox (true );
88
89
m_host = winrt::Microsoft::ReactNative::ReactNativeHost ();
89
90
m_host.InstanceSettings (InstanceSettings ());
90
91
}
Original file line number Diff line number Diff line change 9
9
#include " React.h"
10
10
#include " ReactPropertyBag.h"
11
11
12
+ #include < react/featureflags/ReactNativeFeatureFlags.h>
13
+ #include < react/featureflags/ReactNativeFeatureFlagsDefaults.h>
14
+
12
15
namespace winrt ::Microsoft::ReactNative::implementation {
13
16
14
17
QuirkSettings::QuirkSettings () noexcept {}
15
18
19
+ class QuirkSettingsReactNativeFeatureFlags : public facebook ::react::ReactNativeFeatureFlagsDefaults {
20
+ public:
21
+ QuirkSettingsReactNativeFeatureFlags (bool enableModernCDPRegistry)
22
+ : m_enableModernCDPRegistry(enableModernCDPRegistry) {}
23
+
24
+ bool inspectorEnableModernCDPRegistry () override {
25
+ return m_enableModernCDPRegistry;
26
+ }
27
+
28
+ private:
29
+ bool m_enableModernCDPRegistry;
30
+ };
31
+
16
32
winrt::Microsoft::ReactNative::ReactPropertyId<bool > MatchAndroidAndIOSStretchBehaviorProperty () noexcept {
17
33
static winrt::Microsoft::ReactNative::ReactPropertyId<bool > propId{
18
34
L" ReactNative.QuirkSettings" , L" MatchAndroidAndIOSyStretchBehavior" };
@@ -137,6 +153,10 @@ winrt::Microsoft::ReactNative::ReactPropertyId<bool> IsBridgelessProperty() noex
137
153
ReactPropertyBag (settings.Properties ()).Set (UseRuntimeSchedulerProperty (), value);
138
154
}
139
155
156
+ /* static*/ void QuirkSettings::SetUseFusebox (bool value) noexcept {
157
+ facebook::react::ReactNativeFeatureFlags::override (std::make_unique<QuirkSettingsReactNativeFeatureFlags>(value));
158
+ }
159
+
140
160
#pragma endregion IDL interface
141
161
142
162
/* 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> {
68
68
winrt::Microsoft::ReactNative::ReactInstanceSettings settings,
69
69
bool value) noexcept ;
70
70
71
+ static void SetUseFusebox (bool value) noexcept ;
72
+
71
73
#pragma endregion Public API - part of IDL interface
72
74
};
73
75
Original file line number Diff line number Diff line change @@ -64,6 +64,11 @@ namespace Microsoft.ReactNative
64
64
"By default `react-native-windows` will use the new RuntimeScheduler."
65
65
"Setting this to false will revert the behavior to previous scheduling logic.")
66
66
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);
67
72
}
68
73
69
74
} // namespace Microsoft.ReactNative
You can’t perform that action at this time.
0 commit comments