react-native 0.84.0-nightly-20251112-7dcedf1de → 0.84.0-nightly-20251114-dd6805dec
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTAssert.m +2 -2
- package/React/Base/RCTModuleData.mm +2 -2
- package/React/Base/RCTVersion.m +1 -1
- package/React/CxxModule/RCTCxxMethod.mm +1 -1
- package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +24 -8
- package/ReactAndroid/api/ReactAndroid.api +1 -0
- package/ReactAndroid/build.gradle.kts +2 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerBase.kt +28 -0
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/FrameTiming.kt +68 -0
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +20 -8
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +31 -11
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +34 -12
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android.kt +3 -1
- package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkEventUtil.kt +23 -0
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/soloader/OpenSourceMergedSoMapping.kt +4 -0
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +11 -2
- package/ReactAndroid/src/main/jni/CMakeLists.txt +8 -0
- package/ReactAndroid/src/main/jni/react/devsupport/CMakeLists.txt +3 -1
- package/ReactAndroid/src/main/jni/react/devsupport/JFrameTiming.cpp +46 -0
- package/ReactAndroid/src/main/jni/react/devsupport/JFrameTiming.h +32 -0
- package/ReactAndroid/src/main/jni/react/devsupport/OnLoad.cpp +2 -0
- package/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp +14 -0
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +43 -15
- package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +10 -4
- package/ReactAndroid/src/main/jni/react/tracing/CMakeLists.txt +27 -0
- package/ReactAndroid/src/main/res/views/uimanager/values-ne/strings.xml +2 -0
- package/ReactCommon/React-Fabric.podspec +8 -2
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/jsinspector-modern/tracing/PerformanceTracer.cpp +9 -0
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +13 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +17 -7
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +117 -81
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +8 -4
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +13 -5
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +28 -10
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.h +5 -1
- package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +4 -2
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm +2 -2
- package/ReactCommon/react/nativemodule/defaults/CMakeLists.txt +1 -0
- package/ReactCommon/react/nativemodule/defaults/DefaultTurboModules.cpp +7 -0
- package/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +5 -1
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +16 -6
- package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +7 -3
- package/ReactCommon/react/nativemodule/intersectionobserver/NativeIntersectionObserver.h +4 -0
- package/ReactCommon/react/nativemodule/intersectionobserver/React-intersectionobservernativemodule.podspec +66 -0
- package/ReactCommon/react/networking/NetworkReporter.cpp +19 -22
- package/ReactCommon/react/networking/React-networking.podspec +0 -1
- package/ReactCommon/react/performance/timeline/PerformanceEntryReporter.cpp +1 -1
- package/ReactCommon/react/renderer/animated/AnimatedModule.cpp +3 -0
- package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +21 -1
- package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +14 -0
- package/ReactCommon/react/renderer/core/Props.cpp +23 -8
- package/ReactCommon/react/renderer/core/Props.h +6 -4
- package/ReactCommon/react/renderer/core/ShadowNode.cpp +4 -10
- package/ReactCommon/react/renderer/core/tests/ShadowNodeTest.cpp +32 -0
- package/ReactCommon/react/renderer/graphics/BlendMode.h +2 -0
- package/ReactCommon/react/renderer/graphics/Filter.h +2 -0
- package/ReactCommon/react/renderer/imagemanager/ImageManager.h +3 -0
- package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageFetcher.cpp +7 -2
- package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageFetcher.h +6 -3
- package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageManager.cpp +16 -4
- package/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/RCTSyncImageManager.mm +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm +2 -3
- package/ReactCommon/yoga/yoga/algorithm/FlexDirection.h +6 -6
- package/ReactCommon/yoga/yoga/algorithm/SizingMode.h +4 -4
- package/ReactCommon/yoga/yoga/style/Style.h +8 -8
- package/package.json +8 -8
- package/scripts/react_native_pods.rb +1 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +18 -8
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +4 -2
- package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<acef1e4ac15cf78463831e3aeb35b641>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -55,6 +55,7 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
55
55
|
bool enableDoubleMeasurementFixAndroid();
|
|
56
56
|
bool enableEagerMainQueueModulesOnIOS();
|
|
57
57
|
bool enableEagerRootViewAttachment();
|
|
58
|
+
bool enableExclusivePropsUpdateAndroid();
|
|
58
59
|
bool enableFabricLogs();
|
|
59
60
|
bool enableFabricRenderer();
|
|
60
61
|
bool enableFontScaleChangesUpdatingLayout();
|
|
@@ -66,6 +67,7 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
66
67
|
bool enableImmediateUpdateModeForContentOffsetChanges();
|
|
67
68
|
bool enableImperativeFocus();
|
|
68
69
|
bool enableInteropViewManagerClassLookUpOptimizationIOS();
|
|
70
|
+
bool enableIntersectionObserverByDefault();
|
|
69
71
|
bool enableKeyEvents();
|
|
70
72
|
bool enableLayoutAnimationsOnAndroid();
|
|
71
73
|
bool enableLayoutAnimationsOnIOS();
|
|
@@ -75,7 +77,6 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
75
77
|
bool enableNetworkEventReporting();
|
|
76
78
|
bool enablePreparedTextLayout();
|
|
77
79
|
bool enablePropsUpdateReconciliationAndroid();
|
|
78
|
-
bool enableResourceTimingAPI();
|
|
79
80
|
bool enableSwiftUIBasedFilters();
|
|
80
81
|
bool enableViewCulling();
|
|
81
82
|
bool enableViewRecycling();
|
|
@@ -100,6 +101,7 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
100
101
|
double preparedTextCacheSize();
|
|
101
102
|
bool preventShadowTreeCommitExhaustion();
|
|
102
103
|
bool shouldPressibilityUseW3CPointerEventsForHover();
|
|
104
|
+
bool shouldSetEnabledBasedOnAccessibilityState();
|
|
103
105
|
bool shouldTriggerResponderTransferOnScrollAndroid();
|
|
104
106
|
bool skipActivityIdentityAssertionOnHostPause();
|
|
105
107
|
bool traceTurboModulePromiseRejectionsOnAndroid();
|
|
@@ -129,7 +131,7 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
129
131
|
std::unique_ptr<ReactNativeFeatureFlagsProvider> currentProvider_;
|
|
130
132
|
bool wasOverridden_;
|
|
131
133
|
|
|
132
|
-
std::array<std::atomic<const char*>,
|
|
134
|
+
std::array<std::atomic<const char*>, 88> accessedFeatureFlags_;
|
|
133
135
|
|
|
134
136
|
std::atomic<std::optional<bool>> commonTestFlag_;
|
|
135
137
|
std::atomic<std::optional<bool>> cdpInteractionMetricsEnabled_;
|
|
@@ -154,6 +156,7 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
154
156
|
std::atomic<std::optional<bool>> enableDoubleMeasurementFixAndroid_;
|
|
155
157
|
std::atomic<std::optional<bool>> enableEagerMainQueueModulesOnIOS_;
|
|
156
158
|
std::atomic<std::optional<bool>> enableEagerRootViewAttachment_;
|
|
159
|
+
std::atomic<std::optional<bool>> enableExclusivePropsUpdateAndroid_;
|
|
157
160
|
std::atomic<std::optional<bool>> enableFabricLogs_;
|
|
158
161
|
std::atomic<std::optional<bool>> enableFabricRenderer_;
|
|
159
162
|
std::atomic<std::optional<bool>> enableFontScaleChangesUpdatingLayout_;
|
|
@@ -165,6 +168,7 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
165
168
|
std::atomic<std::optional<bool>> enableImmediateUpdateModeForContentOffsetChanges_;
|
|
166
169
|
std::atomic<std::optional<bool>> enableImperativeFocus_;
|
|
167
170
|
std::atomic<std::optional<bool>> enableInteropViewManagerClassLookUpOptimizationIOS_;
|
|
171
|
+
std::atomic<std::optional<bool>> enableIntersectionObserverByDefault_;
|
|
168
172
|
std::atomic<std::optional<bool>> enableKeyEvents_;
|
|
169
173
|
std::atomic<std::optional<bool>> enableLayoutAnimationsOnAndroid_;
|
|
170
174
|
std::atomic<std::optional<bool>> enableLayoutAnimationsOnIOS_;
|
|
@@ -174,7 +178,6 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
174
178
|
std::atomic<std::optional<bool>> enableNetworkEventReporting_;
|
|
175
179
|
std::atomic<std::optional<bool>> enablePreparedTextLayout_;
|
|
176
180
|
std::atomic<std::optional<bool>> enablePropsUpdateReconciliationAndroid_;
|
|
177
|
-
std::atomic<std::optional<bool>> enableResourceTimingAPI_;
|
|
178
181
|
std::atomic<std::optional<bool>> enableSwiftUIBasedFilters_;
|
|
179
182
|
std::atomic<std::optional<bool>> enableViewCulling_;
|
|
180
183
|
std::atomic<std::optional<bool>> enableViewRecycling_;
|
|
@@ -199,6 +202,7 @@ class ReactNativeFeatureFlagsAccessor {
|
|
|
199
202
|
std::atomic<std::optional<double>> preparedTextCacheSize_;
|
|
200
203
|
std::atomic<std::optional<bool>> preventShadowTreeCommitExhaustion_;
|
|
201
204
|
std::atomic<std::optional<bool>> shouldPressibilityUseW3CPointerEventsForHover_;
|
|
205
|
+
std::atomic<std::optional<bool>> shouldSetEnabledBasedOnAccessibilityState_;
|
|
202
206
|
std::atomic<std::optional<bool>> shouldTriggerResponderTransferOnScrollAndroid_;
|
|
203
207
|
std::atomic<std::optional<bool>> skipActivityIdentityAssertionOnHostPause_;
|
|
204
208
|
std::atomic<std::optional<bool>> traceTurboModulePromiseRejectionsOnAndroid_;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<18c966119a9b6123aea3b088e0eaf98b>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -119,6 +119,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
|
|
119
119
|
return false;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
bool enableExclusivePropsUpdateAndroid() override {
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
|
|
122
126
|
bool enableFabricLogs() override {
|
|
123
127
|
return false;
|
|
124
128
|
}
|
|
@@ -163,6 +167,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
|
|
163
167
|
return false;
|
|
164
168
|
}
|
|
165
169
|
|
|
170
|
+
bool enableIntersectionObserverByDefault() override {
|
|
171
|
+
return false;
|
|
172
|
+
}
|
|
173
|
+
|
|
166
174
|
bool enableKeyEvents() override {
|
|
167
175
|
return false;
|
|
168
176
|
}
|
|
@@ -199,10 +207,6 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
|
|
199
207
|
return false;
|
|
200
208
|
}
|
|
201
209
|
|
|
202
|
-
bool enableResourceTimingAPI() override {
|
|
203
|
-
return false;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
210
|
bool enableSwiftUIBasedFilters() override {
|
|
207
211
|
return false;
|
|
208
212
|
}
|
|
@@ -299,6 +303,10 @@ class ReactNativeFeatureFlagsDefaults : public ReactNativeFeatureFlagsProvider {
|
|
|
299
303
|
return false;
|
|
300
304
|
}
|
|
301
305
|
|
|
306
|
+
bool shouldSetEnabledBasedOnAccessibilityState() override {
|
|
307
|
+
return true;
|
|
308
|
+
}
|
|
309
|
+
|
|
302
310
|
bool shouldTriggerResponderTransferOnScrollAndroid() override {
|
|
303
311
|
return false;
|
|
304
312
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<152ea11685f3770782035b08831ef04d>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -252,6 +252,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
|
|
252
252
|
return ReactNativeFeatureFlagsDefaults::enableEagerRootViewAttachment();
|
|
253
253
|
}
|
|
254
254
|
|
|
255
|
+
bool enableExclusivePropsUpdateAndroid() override {
|
|
256
|
+
auto value = values_["enableExclusivePropsUpdateAndroid"];
|
|
257
|
+
if (!value.isNull()) {
|
|
258
|
+
return value.getBool();
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
return ReactNativeFeatureFlagsDefaults::enableExclusivePropsUpdateAndroid();
|
|
262
|
+
}
|
|
263
|
+
|
|
255
264
|
bool enableFabricLogs() override {
|
|
256
265
|
auto value = values_["enableFabricLogs"];
|
|
257
266
|
if (!value.isNull()) {
|
|
@@ -351,6 +360,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
|
|
351
360
|
return ReactNativeFeatureFlagsDefaults::enableInteropViewManagerClassLookUpOptimizationIOS();
|
|
352
361
|
}
|
|
353
362
|
|
|
363
|
+
bool enableIntersectionObserverByDefault() override {
|
|
364
|
+
auto value = values_["enableIntersectionObserverByDefault"];
|
|
365
|
+
if (!value.isNull()) {
|
|
366
|
+
return value.getBool();
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
return ReactNativeFeatureFlagsDefaults::enableIntersectionObserverByDefault();
|
|
370
|
+
}
|
|
371
|
+
|
|
354
372
|
bool enableKeyEvents() override {
|
|
355
373
|
auto value = values_["enableKeyEvents"];
|
|
356
374
|
if (!value.isNull()) {
|
|
@@ -432,15 +450,6 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
|
|
432
450
|
return ReactNativeFeatureFlagsDefaults::enablePropsUpdateReconciliationAndroid();
|
|
433
451
|
}
|
|
434
452
|
|
|
435
|
-
bool enableResourceTimingAPI() override {
|
|
436
|
-
auto value = values_["enableResourceTimingAPI"];
|
|
437
|
-
if (!value.isNull()) {
|
|
438
|
-
return value.getBool();
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
return ReactNativeFeatureFlagsDefaults::enableResourceTimingAPI();
|
|
442
|
-
}
|
|
443
|
-
|
|
444
453
|
bool enableSwiftUIBasedFilters() override {
|
|
445
454
|
auto value = values_["enableSwiftUIBasedFilters"];
|
|
446
455
|
if (!value.isNull()) {
|
|
@@ -657,6 +666,15 @@ class ReactNativeFeatureFlagsDynamicProvider : public ReactNativeFeatureFlagsDef
|
|
|
657
666
|
return ReactNativeFeatureFlagsDefaults::shouldPressibilityUseW3CPointerEventsForHover();
|
|
658
667
|
}
|
|
659
668
|
|
|
669
|
+
bool shouldSetEnabledBasedOnAccessibilityState() override {
|
|
670
|
+
auto value = values_["shouldSetEnabledBasedOnAccessibilityState"];
|
|
671
|
+
if (!value.isNull()) {
|
|
672
|
+
return value.getBool();
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
return ReactNativeFeatureFlagsDefaults::shouldSetEnabledBasedOnAccessibilityState();
|
|
676
|
+
}
|
|
677
|
+
|
|
660
678
|
bool shouldTriggerResponderTransferOnScrollAndroid() override {
|
|
661
679
|
auto value = values_["shouldTriggerResponderTransferOnScrollAndroid"];
|
|
662
680
|
if (!value.isNull()) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<1b2061068e0d6c9ca362ceddd97862da>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -35,6 +35,10 @@ class ReactNativeFeatureFlagsOverridesOSSCanary : public ReactNativeFeatureFlags
|
|
|
35
35
|
return true;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
bool enableIntersectionObserverByDefault() override {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
|
|
38
42
|
bool useNativeViewConfigsInBridgelessMode() override {
|
|
39
43
|
return true;
|
|
40
44
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<2fe890d6419dc1aaa9aa2d69a6e96bed>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -48,6 +48,7 @@ class ReactNativeFeatureFlagsProvider {
|
|
|
48
48
|
virtual bool enableDoubleMeasurementFixAndroid() = 0;
|
|
49
49
|
virtual bool enableEagerMainQueueModulesOnIOS() = 0;
|
|
50
50
|
virtual bool enableEagerRootViewAttachment() = 0;
|
|
51
|
+
virtual bool enableExclusivePropsUpdateAndroid() = 0;
|
|
51
52
|
virtual bool enableFabricLogs() = 0;
|
|
52
53
|
virtual bool enableFabricRenderer() = 0;
|
|
53
54
|
virtual bool enableFontScaleChangesUpdatingLayout() = 0;
|
|
@@ -59,6 +60,7 @@ class ReactNativeFeatureFlagsProvider {
|
|
|
59
60
|
virtual bool enableImmediateUpdateModeForContentOffsetChanges() = 0;
|
|
60
61
|
virtual bool enableImperativeFocus() = 0;
|
|
61
62
|
virtual bool enableInteropViewManagerClassLookUpOptimizationIOS() = 0;
|
|
63
|
+
virtual bool enableIntersectionObserverByDefault() = 0;
|
|
62
64
|
virtual bool enableKeyEvents() = 0;
|
|
63
65
|
virtual bool enableLayoutAnimationsOnAndroid() = 0;
|
|
64
66
|
virtual bool enableLayoutAnimationsOnIOS() = 0;
|
|
@@ -68,7 +70,6 @@ class ReactNativeFeatureFlagsProvider {
|
|
|
68
70
|
virtual bool enableNetworkEventReporting() = 0;
|
|
69
71
|
virtual bool enablePreparedTextLayout() = 0;
|
|
70
72
|
virtual bool enablePropsUpdateReconciliationAndroid() = 0;
|
|
71
|
-
virtual bool enableResourceTimingAPI() = 0;
|
|
72
73
|
virtual bool enableSwiftUIBasedFilters() = 0;
|
|
73
74
|
virtual bool enableViewCulling() = 0;
|
|
74
75
|
virtual bool enableViewRecycling() = 0;
|
|
@@ -93,6 +94,7 @@ class ReactNativeFeatureFlagsProvider {
|
|
|
93
94
|
virtual double preparedTextCacheSize() = 0;
|
|
94
95
|
virtual bool preventShadowTreeCommitExhaustion() = 0;
|
|
95
96
|
virtual bool shouldPressibilityUseW3CPointerEventsForHover() = 0;
|
|
97
|
+
virtual bool shouldSetEnabledBasedOnAccessibilityState() = 0;
|
|
96
98
|
virtual bool shouldTriggerResponderTransferOnScrollAndroid() = 0;
|
|
97
99
|
virtual bool skipActivityIdentityAssertionOnHostPause() = 0;
|
|
98
100
|
virtual bool traceTurboModulePromiseRejectionsOnAndroid() = 0;
|
package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm
CHANGED
|
@@ -694,7 +694,7 @@ typedef struct {
|
|
|
694
694
|
} else if (_bridgeProxy) {
|
|
695
695
|
[(id)module setValue:_bridgeProxy forKey:@"bridge"];
|
|
696
696
|
}
|
|
697
|
-
} @catch (NSException *
|
|
697
|
+
} @catch (NSException *) {
|
|
698
698
|
RCTLogError(
|
|
699
699
|
@"%@ has no setter or ivar for its bridge, which is not "
|
|
700
700
|
"permitted. You must either @synthesize the bridge property, "
|
|
@@ -742,7 +742,7 @@ typedef struct {
|
|
|
742
742
|
|
|
743
743
|
@try {
|
|
744
744
|
[(id)module setValue:methodQueue forKey:@"methodQueue"];
|
|
745
|
-
} @catch (NSException *
|
|
745
|
+
} @catch (NSException *) {
|
|
746
746
|
RCTLogError(
|
|
747
747
|
@"%@ has no setter or ivar for its methodQueue, which is not "
|
|
748
748
|
"permitted. You must either @synthesize the methodQueue property, "
|
|
@@ -21,6 +21,7 @@ target_link_libraries(react_nativemodule_defaults
|
|
|
21
21
|
react_nativemodule_featureflags
|
|
22
22
|
react_nativemodule_microtasks
|
|
23
23
|
react_nativemodule_idlecallbacks
|
|
24
|
+
react_nativemodule_intersectionobserver
|
|
24
25
|
react_nativemodule_webperformance
|
|
25
26
|
)
|
|
26
27
|
target_compile_reactnative_options(react_nativemodule_defaults PRIVATE)
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
#include <react/nativemodule/dom/NativeDOM.h>
|
|
11
11
|
#include <react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h>
|
|
12
12
|
#include <react/nativemodule/idlecallbacks/NativeIdleCallbacks.h>
|
|
13
|
+
#include <react/nativemodule/intersectionobserver/NativeIntersectionObserver.h>
|
|
13
14
|
#include <react/nativemodule/microtasks/NativeMicrotasks.h>
|
|
14
15
|
#include <react/nativemodule/webperformance/NativePerformance.h>
|
|
15
16
|
|
|
@@ -44,6 +45,12 @@ namespace facebook::react {
|
|
|
44
45
|
}
|
|
45
46
|
}
|
|
46
47
|
|
|
48
|
+
if (ReactNativeFeatureFlags::enableIntersectionObserverByDefault()) {
|
|
49
|
+
if (name == NativeIntersectionObserver::kModuleName) {
|
|
50
|
+
return std::make_shared<NativeIntersectionObserver>(jsInvoker);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
47
54
|
#ifdef REACT_NATIVE_DEBUGGER_ENABLED_DEVONLY
|
|
48
55
|
if (name == DevToolsRuntimeSettingsModule::kModuleName) {
|
|
49
56
|
return std::make_shared<DevToolsRuntimeSettingsModule>(jsInvoker);
|
|
@@ -16,7 +16,9 @@ else
|
|
|
16
16
|
source[:tag] = "v#{version}"
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
header_search_paths = [
|
|
19
|
+
header_search_paths = [
|
|
20
|
+
"\"$(PODS_ROOT)/Headers/Private/Yoga\"",
|
|
21
|
+
]
|
|
20
22
|
|
|
21
23
|
if ENV['USE_FRAMEWORKS']
|
|
22
24
|
header_search_paths << "\"$(PODS_TARGET_SRCROOT)/../../..\"" # this is needed to allow the defaultsnativemodule to access its own files
|
|
@@ -40,6 +42,7 @@ Pod::Spec.new do |s|
|
|
|
40
42
|
|
|
41
43
|
resolve_use_frameworks(s, header_mappings_dir: "../..", module_name: "React_defaultsnativemodule")
|
|
42
44
|
|
|
45
|
+
s.dependency "Yoga"
|
|
43
46
|
s.dependency "React-jsi"
|
|
44
47
|
s.dependency "React-jsiexecutor"
|
|
45
48
|
depend_on_js_engine(s)
|
|
@@ -49,6 +52,7 @@ Pod::Spec.new do |s|
|
|
|
49
52
|
s.dependency "React-domnativemodule"
|
|
50
53
|
s.dependency "React-microtasksnativemodule"
|
|
51
54
|
s.dependency "React-idlecallbacksnativemodule"
|
|
55
|
+
s.dependency "React-intersectionobservernativemodule"
|
|
52
56
|
s.dependency "React-webperformancenativemodule"
|
|
53
57
|
add_dependency(s, "React-RCTFBReactNativeSpec")
|
|
54
58
|
add_dependency(s, "React-featureflags")
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<3235f8d2413da4e9f10c7d8ff78bfeb8>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -159,6 +159,11 @@ bool NativeReactNativeFeatureFlags::enableEagerRootViewAttachment(
|
|
|
159
159
|
return ReactNativeFeatureFlags::enableEagerRootViewAttachment();
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
+
bool NativeReactNativeFeatureFlags::enableExclusivePropsUpdateAndroid(
|
|
163
|
+
jsi::Runtime& /*runtime*/) {
|
|
164
|
+
return ReactNativeFeatureFlags::enableExclusivePropsUpdateAndroid();
|
|
165
|
+
}
|
|
166
|
+
|
|
162
167
|
bool NativeReactNativeFeatureFlags::enableFabricLogs(
|
|
163
168
|
jsi::Runtime& /*runtime*/) {
|
|
164
169
|
return ReactNativeFeatureFlags::enableFabricLogs();
|
|
@@ -214,6 +219,11 @@ bool NativeReactNativeFeatureFlags::enableInteropViewManagerClassLookUpOptimizat
|
|
|
214
219
|
return ReactNativeFeatureFlags::enableInteropViewManagerClassLookUpOptimizationIOS();
|
|
215
220
|
}
|
|
216
221
|
|
|
222
|
+
bool NativeReactNativeFeatureFlags::enableIntersectionObserverByDefault(
|
|
223
|
+
jsi::Runtime& /*runtime*/) {
|
|
224
|
+
return ReactNativeFeatureFlags::enableIntersectionObserverByDefault();
|
|
225
|
+
}
|
|
226
|
+
|
|
217
227
|
bool NativeReactNativeFeatureFlags::enableKeyEvents(
|
|
218
228
|
jsi::Runtime& /*runtime*/) {
|
|
219
229
|
return ReactNativeFeatureFlags::enableKeyEvents();
|
|
@@ -259,11 +269,6 @@ bool NativeReactNativeFeatureFlags::enablePropsUpdateReconciliationAndroid(
|
|
|
259
269
|
return ReactNativeFeatureFlags::enablePropsUpdateReconciliationAndroid();
|
|
260
270
|
}
|
|
261
271
|
|
|
262
|
-
bool NativeReactNativeFeatureFlags::enableResourceTimingAPI(
|
|
263
|
-
jsi::Runtime& /*runtime*/) {
|
|
264
|
-
return ReactNativeFeatureFlags::enableResourceTimingAPI();
|
|
265
|
-
}
|
|
266
|
-
|
|
267
272
|
bool NativeReactNativeFeatureFlags::enableSwiftUIBasedFilters(
|
|
268
273
|
jsi::Runtime& /*runtime*/) {
|
|
269
274
|
return ReactNativeFeatureFlags::enableSwiftUIBasedFilters();
|
|
@@ -384,6 +389,11 @@ bool NativeReactNativeFeatureFlags::shouldPressibilityUseW3CPointerEventsForHove
|
|
|
384
389
|
return ReactNativeFeatureFlags::shouldPressibilityUseW3CPointerEventsForHover();
|
|
385
390
|
}
|
|
386
391
|
|
|
392
|
+
bool NativeReactNativeFeatureFlags::shouldSetEnabledBasedOnAccessibilityState(
|
|
393
|
+
jsi::Runtime& /*runtime*/) {
|
|
394
|
+
return ReactNativeFeatureFlags::shouldSetEnabledBasedOnAccessibilityState();
|
|
395
|
+
}
|
|
396
|
+
|
|
387
397
|
bool NativeReactNativeFeatureFlags::shouldTriggerResponderTransferOnScrollAndroid(
|
|
388
398
|
jsi::Runtime& /*runtime*/) {
|
|
389
399
|
return ReactNativeFeatureFlags::shouldTriggerResponderTransferOnScrollAndroid();
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<9a7d4159c54f9ccc3e0d3cc461b66b7e>>
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
@@ -82,6 +82,8 @@ class NativeReactNativeFeatureFlags
|
|
|
82
82
|
|
|
83
83
|
bool enableEagerRootViewAttachment(jsi::Runtime& runtime);
|
|
84
84
|
|
|
85
|
+
bool enableExclusivePropsUpdateAndroid(jsi::Runtime& runtime);
|
|
86
|
+
|
|
85
87
|
bool enableFabricLogs(jsi::Runtime& runtime);
|
|
86
88
|
|
|
87
89
|
bool enableFabricRenderer(jsi::Runtime& runtime);
|
|
@@ -104,6 +106,8 @@ class NativeReactNativeFeatureFlags
|
|
|
104
106
|
|
|
105
107
|
bool enableInteropViewManagerClassLookUpOptimizationIOS(jsi::Runtime& runtime);
|
|
106
108
|
|
|
109
|
+
bool enableIntersectionObserverByDefault(jsi::Runtime& runtime);
|
|
110
|
+
|
|
107
111
|
bool enableKeyEvents(jsi::Runtime& runtime);
|
|
108
112
|
|
|
109
113
|
bool enableLayoutAnimationsOnAndroid(jsi::Runtime& runtime);
|
|
@@ -122,8 +126,6 @@ class NativeReactNativeFeatureFlags
|
|
|
122
126
|
|
|
123
127
|
bool enablePropsUpdateReconciliationAndroid(jsi::Runtime& runtime);
|
|
124
128
|
|
|
125
|
-
bool enableResourceTimingAPI(jsi::Runtime& runtime);
|
|
126
|
-
|
|
127
129
|
bool enableSwiftUIBasedFilters(jsi::Runtime& runtime);
|
|
128
130
|
|
|
129
131
|
bool enableViewCulling(jsi::Runtime& runtime);
|
|
@@ -172,6 +174,8 @@ class NativeReactNativeFeatureFlags
|
|
|
172
174
|
|
|
173
175
|
bool shouldPressibilityUseW3CPointerEventsForHover(jsi::Runtime& runtime);
|
|
174
176
|
|
|
177
|
+
bool shouldSetEnabledBasedOnAccessibilityState(jsi::Runtime& runtime);
|
|
178
|
+
|
|
175
179
|
bool shouldTriggerResponderTransferOnScrollAndroid(jsi::Runtime& runtime);
|
|
176
180
|
|
|
177
181
|
bool skipActivityIdentityAssertionOnHostPause(jsi::Runtime& runtime);
|
|
@@ -7,7 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
|
+
#if __has_include("FBReactNativeSpecJSI.h") // CocoaPod headers on Apple
|
|
11
|
+
#include "FBReactNativeSpecJSI.h"
|
|
12
|
+
#else
|
|
10
13
|
#include <FBReactNativeSpec/FBReactNativeSpecJSI.h>
|
|
14
|
+
#endif
|
|
11
15
|
#include <react/renderer/bridging/bridging.h>
|
|
12
16
|
#include <react/renderer/observers/intersection/IntersectionObserverManager.h>
|
|
13
17
|
#include <optional>
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2
|
+
#
|
|
3
|
+
# This source code is licensed under the MIT license found in the
|
|
4
|
+
# LICENSE file in the root directory of this source tree.
|
|
5
|
+
|
|
6
|
+
require "json"
|
|
7
|
+
|
|
8
|
+
package = JSON.parse(File.read(File.join(__dir__, "..", "..", "..", "..", "package.json")))
|
|
9
|
+
version = package['version']
|
|
10
|
+
|
|
11
|
+
source = { :git => 'https://github.com/facebook/react-native.git' }
|
|
12
|
+
if version == '1000.0.0'
|
|
13
|
+
# This is an unpublished version, use the latest commit hash of the react-native repo, which we're presumably in.
|
|
14
|
+
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
|
15
|
+
else
|
|
16
|
+
source[:tag] = "v#{version}"
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
header_search_paths = [
|
|
20
|
+
"\"$(PODS_ROOT)/Headers/Private/Yoga\"",
|
|
21
|
+
]
|
|
22
|
+
|
|
23
|
+
if ENV['USE_FRAMEWORKS']
|
|
24
|
+
header_search_paths << "\"$(PODS_TARGET_SRCROOT)/../../..\"" # this is needed to allow the module access its own files
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
Pod::Spec.new do |s|
|
|
28
|
+
s.name = "React-intersectionobservernativemodule"
|
|
29
|
+
s.version = version
|
|
30
|
+
s.summary = "React Native intersection observer native module"
|
|
31
|
+
s.homepage = "https://reactnative.dev/"
|
|
32
|
+
s.license = package["license"]
|
|
33
|
+
s.author = "Meta Platforms, Inc. and its affiliates"
|
|
34
|
+
s.platforms = min_supported_versions
|
|
35
|
+
s.source = source
|
|
36
|
+
s.source_files = podspec_sources("*.{cpp,h}", "*.h")
|
|
37
|
+
s.header_dir = "react/nativemodule/intersectionobserver"
|
|
38
|
+
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
|
39
|
+
"HEADER_SEARCH_PATHS" => header_search_paths.join(' '),
|
|
40
|
+
"OTHER_CFLAGS" => "$(inherited)",
|
|
41
|
+
"DEFINES_MODULE" => "YES" }
|
|
42
|
+
|
|
43
|
+
if ENV['USE_FRAMEWORKS']
|
|
44
|
+
s.module_name = "intersectionobservernativemodule"
|
|
45
|
+
s.header_mappings_dir = "../.."
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
s.dependency "Yoga"
|
|
49
|
+
s.dependency "React-jsi"
|
|
50
|
+
s.dependency "React-jsiexecutor"
|
|
51
|
+
s.dependency "React-cxxreact"
|
|
52
|
+
|
|
53
|
+
depend_on_js_engine(s)
|
|
54
|
+
add_rn_third_party_dependencies(s)
|
|
55
|
+
add_rncore_dependency(s)
|
|
56
|
+
|
|
57
|
+
s.dependency "ReactCommon/turbomodule/core"
|
|
58
|
+
|
|
59
|
+
s.dependency "React-Fabric"
|
|
60
|
+
s.dependency "React-Fabric/bridging"
|
|
61
|
+
s.dependency "React-runtimescheduler"
|
|
62
|
+
add_dependency(s, "React-RCTFBReactNativeSpec")
|
|
63
|
+
add_dependency(s, "React-runtimeexecutor", :additional_framework_paths => ["platform/ios"])
|
|
64
|
+
add_dependency(s, "React-graphics", :additional_framework_paths => ["react/renderer/graphics/platform/ios"])
|
|
65
|
+
|
|
66
|
+
end
|
|
@@ -13,7 +13,6 @@
|
|
|
13
13
|
#include <jsinspector-modern/tracing/PerformanceTracer.h>
|
|
14
14
|
#endif
|
|
15
15
|
#include <jsinspector-modern/network/HttpUtils.h>
|
|
16
|
-
#include <react/featureflags/ReactNativeFeatureFlags.h>
|
|
17
16
|
#include <react/performance/timeline/PerformanceEntryReporter.h>
|
|
18
17
|
|
|
19
18
|
namespace facebook::react {
|
|
@@ -180,27 +179,25 @@ void NetworkReporter::reportResponseEnd(
|
|
|
180
179
|
int encodedDataLength) {
|
|
181
180
|
auto now = HighResTimeStamp::now();
|
|
182
181
|
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
perfTimingsBuffer_.erase(requestId);
|
|
203
|
-
}
|
|
182
|
+
// All builds: Report PerformanceResourceTiming event
|
|
183
|
+
{
|
|
184
|
+
std::lock_guard<std::mutex> lock(perfTimingsMutex_);
|
|
185
|
+
auto it = perfTimingsBuffer_.find(requestId);
|
|
186
|
+
if (it != perfTimingsBuffer_.end()) {
|
|
187
|
+
auto& eventData = it->second;
|
|
188
|
+
PerformanceEntryReporter::getInstance()->reportResourceTiming(
|
|
189
|
+
eventData.url,
|
|
190
|
+
eventData.fetchStart,
|
|
191
|
+
eventData.requestStart,
|
|
192
|
+
eventData.connectStart.value_or(now),
|
|
193
|
+
eventData.connectEnd.value_or(now),
|
|
194
|
+
eventData.responseStart.value_or(now),
|
|
195
|
+
now,
|
|
196
|
+
eventData.responseStatus,
|
|
197
|
+
eventData.contentType,
|
|
198
|
+
eventData.encodedBodySize,
|
|
199
|
+
eventData.decodedBodySize);
|
|
200
|
+
perfTimingsBuffer_.erase(requestId);
|
|
204
201
|
}
|
|
205
202
|
}
|
|
206
203
|
|
|
@@ -41,7 +41,6 @@ Pod::Spec.new do |s|
|
|
|
41
41
|
s.module_name = "React_networking"
|
|
42
42
|
s.header_mappings_dir = "../.."
|
|
43
43
|
end
|
|
44
|
-
add_dependency(s, "React-featureflags")
|
|
45
44
|
add_dependency(s, "React-jsinspectornetwork", :framework_name => 'jsinspector_modernnetwork')
|
|
46
45
|
add_dependency(s, "React-jsinspectortracing", :framework_name => 'jsinspector_moderntracing')
|
|
47
46
|
s.dependency "React-performancetimeline"
|
|
@@ -31,7 +31,7 @@ std::vector<PerformanceEntryType> getSupportedEntryTypesInternal() {
|
|
|
31
31
|
PerformanceEntryType::LONGTASK,
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
if (ReactNativeFeatureFlags::
|
|
34
|
+
if (ReactNativeFeatureFlags::enableNetworkEventReporting()) {
|
|
35
35
|
supportedEntryTypes.emplace_back(PerformanceEntryType::RESOURCE);
|
|
36
36
|
}
|
|
37
37
|
|
|
@@ -221,6 +221,9 @@ void AnimatedModule::queueAndExecuteBatchedOperations(
|
|
|
221
221
|
}
|
|
222
222
|
|
|
223
223
|
void AnimatedModule::executeOperation(const Operation& operation) {
|
|
224
|
+
if (nodesManager_ == nullptr) {
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
224
227
|
std::visit(
|
|
225
228
|
[&](const auto& op) {
|
|
226
229
|
using T = std::decay_t<decltype(op)>;
|
|
@@ -115,12 +115,32 @@ class ConcreteComponentDescriptor : public ComponentDescriptor {
|
|
|
115
115
|
rawProps.parse(rawPropsParser_);
|
|
116
116
|
|
|
117
117
|
auto shadowNodeProps = ShadowNodeT::Props(context, rawProps, props);
|
|
118
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
119
|
+
bool fallbackToDynamicRawPropsAccumulation = true;
|
|
120
|
+
if (ReactNativeFeatureFlags::enableExclusivePropsUpdateAndroid() &&
|
|
121
|
+
ReactNativeFeatureFlags::enableAccumulatedUpdatesInRawPropsAndroid()) {
|
|
122
|
+
// When exclusive props update is enabled, we only apply Props 1.5 processing
|
|
123
|
+
// (raw props merging) when Props 2.0 is not available.
|
|
124
|
+
if (ReactNativeFeatureFlags::enablePropsUpdateReconciliationAndroid()) {
|
|
125
|
+
// Cast to base Props reference to safely call virtual method
|
|
126
|
+
const auto &baseProps = static_cast<const Props &>(*shadowNodeProps);
|
|
127
|
+
if (strcmp(ShadowNodeT::Name(), baseProps.getDiffPropsImplementationTarget()) == 0) {
|
|
128
|
+
// Props 2.0 supported for this component, Props 1.5 processing can be skipped
|
|
129
|
+
fallbackToDynamicRawPropsAccumulation = false;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (fallbackToDynamicRawPropsAccumulation) {
|
|
134
|
+
ShadowNodeT::initializeDynamicProps(shadowNodeProps, rawProps, props);
|
|
135
|
+
}
|
|
136
|
+
#endif
|
|
118
137
|
// Use the new-style iterator
|
|
119
138
|
// Note that we just check if `Props` has this flag set, no matter
|
|
120
139
|
// the type of ShadowNode; it acts as the single global flag.
|
|
121
140
|
if (ReactNativeFeatureFlags::enableCppPropsIteratorSetter()) {
|
|
122
141
|
#ifdef RN_SERIALIZABLE_STATE
|
|
123
|
-
const auto &dynamic =
|
|
142
|
+
const auto &dynamic =
|
|
143
|
+
fallbackToDynamicRawPropsAccumulation ? shadowNodeProps->rawProps : static_cast<folly::dynamic>(rawProps);
|
|
124
144
|
#else
|
|
125
145
|
const auto &dynamic = static_cast<folly::dynamic>(rawProps);
|
|
126
146
|
#endif
|
|
@@ -78,6 +78,20 @@ class ConcreteShadowNode : public BaseShadowNodeT {
|
|
|
78
78
|
context, baseProps ? static_cast<const PropsT &>(*baseProps) : *defaultSharedProps(), rawProps);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
#ifdef RN_SERIALIZABLE_STATE
|
|
82
|
+
static void initializeDynamicProps(
|
|
83
|
+
UnsharedConcreteProps props,
|
|
84
|
+
const RawProps &rawProps,
|
|
85
|
+
const Props::Shared &baseProps = nullptr)
|
|
86
|
+
{
|
|
87
|
+
if (baseProps) {
|
|
88
|
+
props->initializeDynamicProps(static_cast<const PropsT &>(*baseProps), rawProps);
|
|
89
|
+
} else {
|
|
90
|
+
props->initializeDynamicProps(*defaultSharedProps(), rawProps);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
#endif
|
|
94
|
+
|
|
81
95
|
static const SharedConcreteProps &defaultSharedProps()
|
|
82
96
|
{
|
|
83
97
|
static const SharedConcreteProps defaultSharedProps = std::make_shared<const PropsT>();
|