react-native 0.83.0-nightly-20250905-a50ddf3d8 → 0.83.0-nightly-20250907-02e3a999e

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.
Files changed (58) hide show
  1. package/Libraries/Core/ReactNativeVersion.js +1 -1
  2. package/React/Base/RCTVersion.m +1 -1
  3. package/React/FBReactNativeSpec/FBReactNativeSpecJSI-generated.cpp +6 -0
  4. package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +9 -0
  5. package/React/Inspector/RCTCxxInspectorPackagerConnectionDelegate.mm +1 -1
  6. package/React/Inspector/RCTCxxInspectorWebSocketAdapter.mm +2 -2
  7. package/React/Views/RCTComponentData.mm +19 -19
  8. package/ReactAndroid/api/ReactAndroid.api +2 -0
  9. package/ReactAndroid/gradle.properties +1 -1
  10. package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +2 -1
  11. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.kt +12 -2
  12. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java +115 -1
  13. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +7 -1
  14. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +11 -1
  15. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +3 -1
  16. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +3 -1
  17. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +12 -1
  18. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +3 -1
  19. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
  20. package/ReactAndroid/src/main/jni/first-party/fbgloginit/glog_init.cpp +1 -1
  21. package/ReactAndroid/src/main/jni/react/devsupport/JInspectorNetworkReporter.cpp +3 -2
  22. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +15 -1
  23. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +4 -1
  24. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  25. package/ReactCommon/jsc/JSCRuntime.cpp +12 -12
  26. package/ReactCommon/jsinspector-modern/tests/InspectorPackagerConnectionTest.cpp +2 -2
  27. package/ReactCommon/jsinspector-modern/tests/JsiIntegrationTest.h +4 -4
  28. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +5 -1
  29. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +6 -1
  30. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +39 -21
  31. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +4 -2
  32. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +5 -1
  33. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +10 -1
  34. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +2 -1
  35. package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +2 -1
  36. package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTInteropTurboModule.mm +5 -5
  37. package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +15 -15
  38. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +6 -1
  39. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +3 -1
  40. package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleLegacyModule.mm +4 -4
  41. package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.mm +4 -4
  42. package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManager.cpp +13 -7
  43. package/ReactCommon/react/renderer/attributedstring/conversions.h +25 -25
  44. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +2 -2
  45. package/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputComponentDescriptor.h +1 -1
  46. package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp +1 -1
  47. package/ReactCommon/react/renderer/graphics/platform/android/react/renderer/graphics/HostPlatformColor.h +1 -1
  48. package/ReactCommon/react/renderer/graphics/platform/android/react/renderer/graphics/PlatformColorParser.h +1 -1
  49. package/ReactCommon/react/renderer/graphics/platform/cxx/react/renderer/graphics/HostPlatformColor.h +1 -1
  50. package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.h +8 -8
  51. package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/HostPlatformColor.mm +14 -14
  52. package/ReactCommon/react/renderer/graphics/platform/ios/react/renderer/graphics/PlatformColorParser.mm +4 -4
  53. package/package.json +8 -8
  54. package/sdks/hermesc/osx-bin/hermes +0 -0
  55. package/sdks/hermesc/osx-bin/hermesc +0 -0
  56. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  57. package/src/private/featureflags/ReactNativeFeatureFlags.js +6 -1
  58. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +2 -1
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
29
29
  static major: number = 0;
30
30
  static minor: number = 83;
31
31
  static patch: number = 0;
32
- static prerelease: string | null = 'nightly-20250905-a50ddf3d8';
32
+ static prerelease: string | null = 'nightly-20250907-02e3a999e';
33
33
 
34
34
  static getVersionString(): string {
35
35
  return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(83),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"nightly-20250905-a50ddf3d8",
27
+ RCTVersionPrerelease: @"nightly-20250907-02e3a999e",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -332,6 +332,11 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_hideOff
332
332
  rt
333
333
  );
334
334
  }
335
+ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_overrideBySynchronousMountPropsAtMountingAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
336
+ return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->overrideBySynchronousMountPropsAtMountingAndroid(
337
+ rt
338
+ );
339
+ }
335
340
  static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_perfMonitorV2Enabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
336
341
  return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->perfMonitorV2Enabled(
337
342
  rt
@@ -485,6 +490,7 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI
485
490
  methodMap_["fuseboxEnabledRelease"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxEnabledRelease};
486
491
  methodMap_["fuseboxNetworkInspectionEnabled"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxNetworkInspectionEnabled};
487
492
  methodMap_["hideOffscreenVirtualViewsOnIOS"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_hideOffscreenVirtualViewsOnIOS};
493
+ methodMap_["overrideBySynchronousMountPropsAtMountingAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_overrideBySynchronousMountPropsAtMountingAndroid};
488
494
  methodMap_["perfMonitorV2Enabled"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_perfMonitorV2Enabled};
489
495
  methodMap_["preparedTextCacheSize"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_preparedTextCacheSize};
490
496
  methodMap_["preventShadowTreeCommitExhaustion"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_preventShadowTreeCommitExhaustion};
@@ -376,6 +376,7 @@ public:
376
376
  virtual bool fuseboxEnabledRelease(jsi::Runtime &rt) = 0;
377
377
  virtual bool fuseboxNetworkInspectionEnabled(jsi::Runtime &rt) = 0;
378
378
  virtual bool hideOffscreenVirtualViewsOnIOS(jsi::Runtime &rt) = 0;
379
+ virtual bool overrideBySynchronousMountPropsAtMountingAndroid(jsi::Runtime &rt) = 0;
379
380
  virtual bool perfMonitorV2Enabled(jsi::Runtime &rt) = 0;
380
381
  virtual double preparedTextCacheSize(jsi::Runtime &rt) = 0;
381
382
  virtual bool preventShadowTreeCommitExhaustion(jsi::Runtime &rt) = 0;
@@ -826,6 +827,14 @@ private:
826
827
  return bridging::callFromJs<bool>(
827
828
  rt, &T::hideOffscreenVirtualViewsOnIOS, jsInvoker_, instance_);
828
829
  }
830
+ bool overrideBySynchronousMountPropsAtMountingAndroid(jsi::Runtime &rt) override {
831
+ static_assert(
832
+ bridging::getParameterCount(&T::overrideBySynchronousMountPropsAtMountingAndroid) == 1,
833
+ "Expected overrideBySynchronousMountPropsAtMountingAndroid(...) to have 1 parameters");
834
+
835
+ return bridging::callFromJs<bool>(
836
+ rt, &T::overrideBySynchronousMountPropsAtMountingAndroid, jsInvoker_, instance_);
837
+ }
829
838
  bool perfMonitorV2Enabled(jsi::Runtime &rt) override {
830
839
  static_assert(
831
840
  bridging::getParameterCount(&T::perfMonitorV2Enabled) == 1,
@@ -32,7 +32,7 @@ std::unique_ptr<IWebSocket> RCTCxxInspectorPackagerConnectionDelegate::connectWe
32
32
  std::weak_ptr<IWebSocketDelegate> delegate)
33
33
  {
34
34
  auto *adapter = [[RCTCxxInspectorWebSocketAdapter alloc] initWithURL:url delegate:delegate];
35
- if (!adapter) {
35
+ if (adapter == nullptr) {
36
36
  return nullptr;
37
37
  }
38
38
  return std::make_unique<WebSocket>(adapter);
@@ -34,7 +34,7 @@ NSString *NSStringFromUTF8StringView(std::string_view view)
34
34
  @implementation RCTCxxInspectorWebSocketAdapter
35
35
  - (instancetype)initWithURL:(const std::string &)url delegate:(std::weak_ptr<IWebSocketDelegate>)delegate
36
36
  {
37
- if ((self = [super init])) {
37
+ if ((self = [super init]) != nullptr) {
38
38
  _delegate = delegate;
39
39
  _webSocket = [[SRWebSocket alloc] initWithURL:[NSURL URLWithString:NSStringFromUTF8StringView(url)]];
40
40
  _webSocket.delegate = self;
@@ -49,7 +49,7 @@ NSString *NSStringFromUTF8StringView(std::string_view view)
49
49
  NSString *messageStr = NSStringFromUTF8StringView(message);
50
50
  dispatch_async(dispatch_get_main_queue(), ^{
51
51
  RCTCxxInspectorWebSocketAdapter *strongSelf = weakSelf;
52
- if (strongSelf) {
52
+ if (strongSelf != nullptr) {
53
53
  [strongSelf->_webSocket sendString:messageStr error:NULL];
54
54
  }
55
55
  });
@@ -50,7 +50,7 @@ static SEL selectorForType(NSString *type)
50
50
  bridge:(RCTBridge *)bridge
51
51
  eventDispatcher:(id<RCTEventDispatcherProtocol>)eventDispatcher
52
52
  {
53
- if ((self = [super init])) {
53
+ if ((self = [super init]) != nullptr) {
54
54
  _bridge = bridge;
55
55
  _eventDispatcher = eventDispatcher;
56
56
  _managerClass = managerClass;
@@ -71,12 +71,12 @@ static SEL selectorForType(NSString *type)
71
71
 
72
72
  - (RCTViewManager *)manager
73
73
  {
74
- if (!_manager && [self isBridgeMode]) {
74
+ if ((_manager == nullptr) && [self isBridgeMode]) {
75
75
  _manager = [_bridge moduleForClass:_managerClass];
76
- } else if (!_manager && !_bridgelessViewManager) {
76
+ } else if ((_manager == nullptr) && (_bridgelessViewManager == nullptr)) {
77
77
  _bridgelessViewManager = [_bridge moduleForClass:_managerClass];
78
78
  }
79
- return _manager ? _manager : _bridgelessViewManager;
79
+ return (_manager != nullptr) ? _manager : _bridgelessViewManager;
80
80
  }
81
81
 
82
82
  RCT_NOT_IMPLEMENTED(-(instancetype)init)
@@ -106,7 +106,7 @@ RCT_NOT_IMPLEMENTED(-(instancetype)init)
106
106
  {
107
107
  json = RCTNilIfNull(json);
108
108
  if (!isShadowView) {
109
- if (!json && !_defaultView) {
109
+ if ((json == nullptr) && (_defaultView == nullptr)) {
110
110
  // Only create default view if json is null
111
111
  _defaultView = [self createViewWithTag:nil rootTag:nil];
112
112
  }
@@ -130,11 +130,11 @@ static RCTPropBlock createEventSetter(
130
130
  eventHandler = ^(NSDictionary *event) {
131
131
  // The component no longer exists, we shouldn't send the event
132
132
  id<RCTComponent> strongTarget = weakTarget;
133
- if (!strongTarget) {
133
+ if (strongTarget == nullptr) {
134
134
  return;
135
135
  }
136
136
 
137
- if (eventInterceptor) {
137
+ if (eventInterceptor != nullptr) {
138
138
  eventInterceptor(propName, event, strongTarget.reactTag);
139
139
  } else {
140
140
  RCTComponentEvent *componentEvent = [[RCTComponentEvent alloc] initWithName:propName
@@ -158,13 +158,13 @@ static RCTPropBlock createNSInvocationSetter(NSMethodSignature *typeSignature, S
158
158
  __block NSMutableData *defaultValue = nil;
159
159
 
160
160
  return ^(id target, id json) {
161
- if (!target) {
161
+ if (target == nullptr) {
162
162
  return;
163
163
  }
164
164
 
165
165
  // Get default value
166
- if (!defaultValue) {
167
- if (!json) {
166
+ if (defaultValue == nullptr) {
167
+ if (json == nullptr) {
168
168
  // We only set the defaultValue when we first pass a non-null
169
169
  // value, so if the first value sent for a prop is null, it's
170
170
  // a no-op (we'd be resetting it to its default when its
@@ -186,10 +186,10 @@ static RCTPropBlock createNSInvocationSetter(NSMethodSignature *typeSignature, S
186
186
  // Get value
187
187
  BOOL freeValueOnCompletion = NO;
188
188
  void *value = defaultValue.mutableBytes;
189
- if (json) {
189
+ if (json != nullptr) {
190
190
  freeValueOnCompletion = YES;
191
191
  value = malloc(typeSignature.methodReturnLength);
192
- if (!value) {
192
+ if (value == nullptr) {
193
193
  // CWE - 391 : Unchecked error condition
194
194
  // https://www.cvedetails.com/cwe-details/391/Unchecked-Error-Condition.html
195
195
  // https://eli.thegreenplace.net/2009/10/30/handling-out-of-memory-conditions-in-c
@@ -201,7 +201,7 @@ static RCTPropBlock createNSInvocationSetter(NSMethodSignature *typeSignature, S
201
201
  }
202
202
 
203
203
  // Set value
204
- if (!targetInvocation) {
204
+ if (targetInvocation == nullptr) {
205
205
  NSMethodSignature *signature = [target methodSignatureForSelector:setter];
206
206
  targetInvocation = [NSInvocation invocationWithMethodSignature:signature];
207
207
  targetInvocation.selector = setter;
@@ -252,7 +252,7 @@ static RCTPropBlock createNSInvocationSetter(NSMethodSignature *typeSignature, S
252
252
  // Disect keypath
253
253
  NSString *key = name;
254
254
  NSArray<NSString *> *parts = [keyPath componentsSeparatedByString:@"."];
255
- if (parts) {
255
+ if (parts != nullptr) {
256
256
  key = parts.lastObject;
257
257
  parts = [parts subarrayWithRange:(NSRange){0, parts.count - 1}];
258
258
  }
@@ -275,7 +275,7 @@ static RCTPropBlock createNSInvocationSetter(NSMethodSignature *typeSignature, S
275
275
  } else {
276
276
  // Ordinary property handlers
277
277
  NSMethodSignature *typeSignature = [[RCTConvert class] methodSignatureForSelector:type];
278
- if (!typeSignature) {
278
+ if (typeSignature == nullptr) {
279
279
  RCTLogError(@"No +[RCTConvert %@] function found.", NSStringFromSelector(type));
280
280
  return ^(__unused id<RCTComponent> view, __unused id json) {
281
281
  };
@@ -347,7 +347,7 @@ static RCTPropBlock createNSInvocationSetter(NSMethodSignature *typeSignature, S
347
347
  {
348
348
  RCTPropBlockDictionary *propBlocks = isShadowView ? _shadowPropBlocks : _viewPropBlocks;
349
349
  RCTPropBlock propBlock = propBlocks[name];
350
- if (!propBlock) {
350
+ if (propBlock == nullptr) {
351
351
  propBlock = [self createPropBlock:name isShadowView:isShadowView];
352
352
 
353
353
  #if RCT_DEBUG
@@ -381,7 +381,7 @@ static RCTPropBlock createNSInvocationSetter(NSMethodSignature *typeSignature, S
381
381
 
382
382
  - (void)setProps:(NSDictionary<NSString *, id> *)props forView:(id<RCTComponent>)view isShadowView:(BOOL)isShadowView
383
383
  {
384
- if (!view) {
384
+ if (view == nullptr) {
385
385
  return;
386
386
  }
387
387
 
@@ -467,13 +467,13 @@ static RCTPropBlock createNSInvocationSetter(NSMethodSignature *typeSignature, S
467
467
 
468
468
  // We need to handle both propConfig_* and propConfigShadow_* methods
469
469
  const char *underscorePos = strchr(selectorName + strlen("propConfig"), '_');
470
- if (!underscorePos) {
470
+ if (underscorePos == nullptr) {
471
471
  continue;
472
472
  }
473
473
 
474
474
  NSString *name = @(underscorePos + 1);
475
475
  NSString *type = ((NSArray<NSString *> * (*)(id, SEL)) objc_msgSend)(managerClass, selector)[0];
476
- if (RCT_DEBUG && propTypes[name] && ![propTypes[name] isEqualToString:type]) {
476
+ if (RCT_DEBUG && (propTypes[name] != nullptr) && ![propTypes[name] isEqualToString:type]) {
477
477
  RCTLogError(
478
478
  @"Property '%@' of component '%@' redefined from '%@' "
479
479
  "to '%@'",
@@ -2354,12 +2354,14 @@ public class com/facebook/react/fabric/mounting/SurfaceMountingManager {
2354
2354
  public fun sendAccessibilityEvent (II)V
2355
2355
  public fun setJSResponder (IIZ)V
2356
2356
  public fun stopSurface ()V
2357
+ public fun storeSynchronousMountPropsOverride (ILcom/facebook/react/bridge/ReadableMap;)V
2357
2358
  public fun sweepActiveTouchForTag (I)V
2358
2359
  public fun updateEventEmitter (ILcom/facebook/react/fabric/events/EventEmitterWrapper;)V
2359
2360
  public fun updateLayout (IIIIIIII)V
2360
2361
  public fun updateOverflowInset (IIIII)V
2361
2362
  public fun updatePadding (IIIII)V
2362
2363
  public fun updateProps (ILcom/facebook/react/bridge/ReadableMap;)V
2364
+ public fun updatePropsSynchronously (ILcom/facebook/react/bridge/ReadableMap;)V
2363
2365
  public fun updateState (ILcom/facebook/react/uimanager/StateWrapper;)V
2364
2366
  }
2365
2367
 
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.83.0-nightly-20250905-a50ddf3d8
1
+ VERSION_NAME=0.83.0-nightly-20250907-02e3a999e
2
2
  HERMES_VERSION_NAME=1000.0.0
3
3
  react.internal.publishingGroup=com.facebook.react
4
4
  react.internal.hermesPublishingGroup=com.facebook.hermes
@@ -791,7 +791,8 @@ public class FabricUIManager
791
791
  @Override
792
792
  public void execute(MountingManager mountingManager) {
793
793
  try {
794
- mountingManager.updateProps(reactTag, props);
794
+ mountingManager.storeSynchronousMountPropsOverride(reactTag, props);
795
+ mountingManager.updatePropsSynchronously(reactTag, props);
795
796
  } catch (Exception ex) {
796
797
  // TODO T42943890: Fix animations in Fabric and remove this try/catch?
797
798
  // There might always be race conditions between surface teardown and
@@ -265,13 +265,23 @@ internal class MountingManager(
265
265
  }
266
266
 
267
267
  @UiThread
268
- fun updateProps(reactTag: Int, props: ReadableMap?) {
268
+ fun storeSynchronousMountPropsOverride(reactTag: Int, props: ReadableMap?) {
269
269
  assertOnUiThread()
270
270
  if (props == null) {
271
271
  return
272
272
  }
273
273
 
274
- getSurfaceManagerForViewEnforced(reactTag).updateProps(reactTag, props)
274
+ getSurfaceManagerForViewEnforced(reactTag).storeSynchronousMountPropsOverride(reactTag, props)
275
+ }
276
+
277
+ @UiThread
278
+ fun updatePropsSynchronously(reactTag: Int, props: ReadableMap?) {
279
+ assertOnUiThread()
280
+ if (props == null) {
281
+ return
282
+ }
283
+
284
+ getSurfaceManagerForViewEnforced(reactTag).updatePropsSynchronously(reactTag, props)
275
285
  }
276
286
 
277
287
  /**
@@ -27,10 +27,14 @@ import com.facebook.react.bridge.ReactNoCrashSoftException;
27
27
  import com.facebook.react.bridge.ReactSoftExceptionLogger;
28
28
  import com.facebook.react.bridge.ReadableArray;
29
29
  import com.facebook.react.bridge.ReadableMap;
30
+ import com.facebook.react.bridge.ReadableType;
30
31
  import com.facebook.react.bridge.RetryableMountingLayerException;
31
32
  import com.facebook.react.bridge.SoftAssertions;
32
33
  import com.facebook.react.bridge.UiThreadUtil;
34
+ import com.facebook.react.bridge.WritableArray;
33
35
  import com.facebook.react.bridge.WritableMap;
36
+ import com.facebook.react.bridge.WritableNativeArray;
37
+ import com.facebook.react.bridge.WritableNativeMap;
34
38
  import com.facebook.react.common.annotations.UnstableReactNativeAPI;
35
39
  import com.facebook.react.common.build.ReactBuildConfig;
36
40
  import com.facebook.react.common.mapbuffer.MapBuffer;
@@ -53,7 +57,10 @@ import com.facebook.react.uimanager.ViewManagerRegistry;
53
57
  import com.facebook.react.uimanager.events.EventCategoryDef;
54
58
  import com.facebook.systrace.Systrace;
55
59
  import java.util.ArrayDeque;
60
+ import java.util.ArrayList;
61
+ import java.util.HashMap;
56
62
  import java.util.HashSet;
63
+ import java.util.Iterator;
57
64
  import java.util.LinkedList;
58
65
  import java.util.Map;
59
66
  import java.util.Queue;
@@ -96,6 +103,11 @@ public class SurfaceMountingManager {
96
103
  // This is null *until* StopSurface is called.
97
104
  private SparseArrayCompat<Object> mTagSetForStoppedSurface;
98
105
 
106
+ // This is to make sure direct manipulation result will not be overridden by React update.
107
+ @ThreadConfined(UI)
108
+ private final SparseArrayCompat<Map<String, Object>> mTagToSynchronousMountProps =
109
+ new SparseArrayCompat<>();
110
+
99
111
  private final int mSurfaceId;
100
112
 
101
113
  public SurfaceMountingManager(
@@ -682,13 +694,110 @@ public class SurfaceMountingManager {
682
694
  }
683
695
  }
684
696
 
697
+ private static void overridePropsReadableMap(
698
+ Map<String, Object> patchMap, WritableMap outputReadableMap) {
699
+ for (Map.Entry<String, Object> entry : patchMap.entrySet()) {
700
+ String propKey = entry.getKey();
701
+ if (outputReadableMap.hasKey(propKey)) {
702
+ Object propValue = entry.getValue();
703
+ if (propKey.equals("transform")) {
704
+ assert (outputReadableMap.getType(propKey) == ReadableType.Array
705
+ && propValue instanceof ArrayList);
706
+ WritableArray array = new WritableNativeArray();
707
+ for (Object item : (ArrayList<?>) propValue) {
708
+ if (item instanceof HashMap) {
709
+ WritableNativeMap itemMap = new WritableNativeMap();
710
+ for (Map.Entry<String, Object> itemEntry :
711
+ ((HashMap<String, Object>) item).entrySet()) {
712
+ if (itemEntry.getValue() instanceof String) {
713
+ itemMap.putString(itemEntry.getKey(), (String) itemEntry.getValue());
714
+ } else if (itemEntry.getValue() instanceof Number) {
715
+ itemMap.putDouble(
716
+ itemEntry.getKey(), ((Number) itemEntry.getValue()).doubleValue());
717
+ }
718
+ }
719
+ array.pushMap(itemMap);
720
+ }
721
+ }
722
+ outputReadableMap.putArray(propKey, array);
723
+ } else if (propKey.equals("opacity")) {
724
+ assert (outputReadableMap.getType(propKey) == ReadableType.Number
725
+ && propValue instanceof Number);
726
+ outputReadableMap.putDouble(propKey, ((Number) propValue).doubleValue());
727
+ }
728
+ }
729
+ }
730
+ }
731
+
732
+ private static Map<String, Object> getHashMapFromPropsReadableMap(ReadableMap readableMap) {
733
+ HashMap<String, Object> outputMap = new HashMap<>();
734
+
735
+ Iterator<Map.Entry<String, Object>> iter = readableMap.getEntryIterator();
736
+ while (iter.hasNext()) {
737
+ Map.Entry<String, Object> entry = iter.next();
738
+ String propKey = entry.getKey();
739
+ Object propValue = entry.getValue();
740
+ if (propKey.equals("transform") && propValue instanceof ReadableArray) {
741
+ ArrayList<HashMap<String, Object>> arrayList = new ArrayList<>();
742
+ for (int i = 0; i < ((ReadableArray) propValue).size(); i++) {
743
+ ReadableMap map = ((ReadableArray) propValue).getMap(i);
744
+ if (map != null) {
745
+ arrayList.add(map.toHashMap());
746
+ }
747
+ }
748
+ outputMap.put(propKey, arrayList);
749
+ } else if (propKey.equals("opacity") && propValue instanceof Number) {
750
+ outputMap.put(propKey, ((Number) propValue).doubleValue());
751
+ }
752
+ }
753
+
754
+ return outputMap;
755
+ }
756
+
757
+ public void storeSynchronousMountPropsOverride(int reactTag, ReadableMap props) {
758
+ if (ReactNativeFeatureFlags.overrideBySynchronousMountPropsAtMountingAndroid()) {
759
+ Map<String, Object> propsMap = getHashMapFromPropsReadableMap(props);
760
+ if (mTagToSynchronousMountProps.containsKey(reactTag)) {
761
+ Map<String, Object> mergedPropsMap =
762
+ Assertions.assertNotNull(mTagToSynchronousMountProps.get(reactTag));
763
+ mergedPropsMap.putAll(propsMap);
764
+ mTagToSynchronousMountProps.put(reactTag, mergedPropsMap);
765
+ } else {
766
+ mTagToSynchronousMountProps.put(reactTag, propsMap);
767
+ }
768
+ }
769
+ }
770
+
771
+ public void updatePropsSynchronously(int reactTag, ReadableMap props) {
772
+ updateProps(reactTag, props, true);
773
+ }
774
+
685
775
  public void updateProps(int reactTag, ReadableMap props) {
776
+ updateProps(reactTag, props, false);
777
+ }
778
+
779
+ @UiThread
780
+ private void updateProps(
781
+ int reactTag, ReadableMap props, Boolean shouldSkipSynchronousMountPropsOverride) {
686
782
  if (isStopped()) {
687
783
  return;
688
784
  }
689
785
 
690
786
  ViewState viewState = getViewState(reactTag);
691
- viewState.mCurrentProps = new ReactStylesDiffMap(props);
787
+
788
+ if (ReactNativeFeatureFlags.overrideBySynchronousMountPropsAtMountingAndroid()
789
+ && !shouldSkipSynchronousMountPropsOverride
790
+ && mTagToSynchronousMountProps.containsKey(reactTag)) {
791
+ WritableMap modifiedProps = new WritableNativeMap();
792
+ modifiedProps.merge(props);
793
+ Map<String, Object> directPropsMap =
794
+ Assertions.assertNotNull(mTagToSynchronousMountProps.get(reactTag));
795
+ overridePropsReadableMap(directPropsMap, modifiedProps);
796
+ viewState.mCurrentProps = new ReactStylesDiffMap(modifiedProps);
797
+ } else {
798
+ viewState.mCurrentProps = new ReactStylesDiffMap(props);
799
+ }
800
+
692
801
  View view = viewState.mView;
693
802
 
694
803
  if (view == null) {
@@ -1057,6 +1166,11 @@ public class SurfaceMountingManager {
1057
1166
  return;
1058
1167
  }
1059
1168
 
1169
+ if (ReactNativeFeatureFlags.overrideBySynchronousMountPropsAtMountingAndroid()
1170
+ && mTagToSynchronousMountProps.containsKey(reactTag)) {
1171
+ mTagToSynchronousMountProps.remove(reactTag);
1172
+ }
1173
+
1060
1174
  ViewState viewState = getNullableViewState(reactTag);
1061
1175
 
1062
1176
  if (viewState == null) {
@@ -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<<92a6edded037a504fc1c2c8ae88deae1>>
7
+ * @generated SignedSource<<c217318f9f313103ca31d8e7698851d8>>
8
8
  */
9
9
 
10
10
  /**
@@ -324,6 +324,12 @@ public object ReactNativeFeatureFlags {
324
324
  @JvmStatic
325
325
  public fun hideOffscreenVirtualViewsOnIOS(): Boolean = accessor.hideOffscreenVirtualViewsOnIOS()
326
326
 
327
+ /**
328
+ * Override props at mounting with synchronously mounted (i.e. direct manipulation) props from Native Animated.
329
+ */
330
+ @JvmStatic
331
+ public fun overrideBySynchronousMountPropsAtMountingAndroid(): Boolean = accessor.overrideBySynchronousMountPropsAtMountingAndroid()
332
+
327
333
  /**
328
334
  * Enable the V2 in-app Performance Monitor. This flag is global and should not be changed across React Host lifetimes.
329
335
  */
@@ -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<<ebbc6602fc8e3fb4c510bbd47361a7f0>>
7
+ * @generated SignedSource<<4ed350d8dfa42caf27d346dfcfbed974>>
8
8
  */
9
9
 
10
10
  /**
@@ -69,6 +69,7 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
69
69
  private var fuseboxEnabledReleaseCache: Boolean? = null
70
70
  private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
71
71
  private var hideOffscreenVirtualViewsOnIOSCache: Boolean? = null
72
+ private var overrideBySynchronousMountPropsAtMountingAndroidCache: Boolean? = null
72
73
  private var perfMonitorV2EnabledCache: Boolean? = null
73
74
  private var preparedTextCacheSizeCache: Double? = null
74
75
  private var preventShadowTreeCommitExhaustionCache: Boolean? = null
@@ -531,6 +532,15 @@ internal class ReactNativeFeatureFlagsCxxAccessor : ReactNativeFeatureFlagsAcces
531
532
  return cached
532
533
  }
533
534
 
535
+ override fun overrideBySynchronousMountPropsAtMountingAndroid(): Boolean {
536
+ var cached = overrideBySynchronousMountPropsAtMountingAndroidCache
537
+ if (cached == null) {
538
+ cached = ReactNativeFeatureFlagsCxxInterop.overrideBySynchronousMountPropsAtMountingAndroid()
539
+ overrideBySynchronousMountPropsAtMountingAndroidCache = cached
540
+ }
541
+ return cached
542
+ }
543
+
534
544
  override fun perfMonitorV2Enabled(): Boolean {
535
545
  var cached = perfMonitorV2EnabledCache
536
546
  if (cached == null) {
@@ -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<<4410628511f112f3eef22434a05fa757>>
7
+ * @generated SignedSource<<6c201de02071a834e411b6761d7f863b>>
8
8
  */
9
9
 
10
10
  /**
@@ -126,6 +126,8 @@ public object ReactNativeFeatureFlagsCxxInterop {
126
126
 
127
127
  @DoNotStrip @JvmStatic public external fun hideOffscreenVirtualViewsOnIOS(): Boolean
128
128
 
129
+ @DoNotStrip @JvmStatic public external fun overrideBySynchronousMountPropsAtMountingAndroid(): Boolean
130
+
129
131
  @DoNotStrip @JvmStatic public external fun perfMonitorV2Enabled(): Boolean
130
132
 
131
133
  @DoNotStrip @JvmStatic public external fun preparedTextCacheSize(): Double
@@ -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<<411732d441bacbef37c3474b9041202c>>
7
+ * @generated SignedSource<<7c4c3bf6b720f3e15fb97d8f1a4d74ba>>
8
8
  */
9
9
 
10
10
  /**
@@ -121,6 +121,8 @@ public open class ReactNativeFeatureFlagsDefaults : ReactNativeFeatureFlagsProvi
121
121
 
122
122
  override fun hideOffscreenVirtualViewsOnIOS(): Boolean = false
123
123
 
124
+ override fun overrideBySynchronousMountPropsAtMountingAndroid(): Boolean = false
125
+
124
126
  override fun perfMonitorV2Enabled(): Boolean = false
125
127
 
126
128
  override fun preparedTextCacheSize(): Double = 200.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<<2f65e0e9066a8c2c35c44ea7c73dbedc>>
7
+ * @generated SignedSource<<57fca2370d6b3f1edf7045a0b4c94350>>
8
8
  */
9
9
 
10
10
  /**
@@ -73,6 +73,7 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
73
73
  private var fuseboxEnabledReleaseCache: Boolean? = null
74
74
  private var fuseboxNetworkInspectionEnabledCache: Boolean? = null
75
75
  private var hideOffscreenVirtualViewsOnIOSCache: Boolean? = null
76
+ private var overrideBySynchronousMountPropsAtMountingAndroidCache: Boolean? = null
76
77
  private var perfMonitorV2EnabledCache: Boolean? = null
77
78
  private var preparedTextCacheSizeCache: Double? = null
78
79
  private var preventShadowTreeCommitExhaustionCache: Boolean? = null
@@ -584,6 +585,16 @@ internal class ReactNativeFeatureFlagsLocalAccessor : ReactNativeFeatureFlagsAcc
584
585
  return cached
585
586
  }
586
587
 
588
+ override fun overrideBySynchronousMountPropsAtMountingAndroid(): Boolean {
589
+ var cached = overrideBySynchronousMountPropsAtMountingAndroidCache
590
+ if (cached == null) {
591
+ cached = currentProvider.overrideBySynchronousMountPropsAtMountingAndroid()
592
+ accessedFeatureFlags.add("overrideBySynchronousMountPropsAtMountingAndroid")
593
+ overrideBySynchronousMountPropsAtMountingAndroidCache = cached
594
+ }
595
+ return cached
596
+ }
597
+
587
598
  override fun perfMonitorV2Enabled(): Boolean {
588
599
  var cached = perfMonitorV2EnabledCache
589
600
  if (cached == null) {
@@ -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<<e97601660cfd4f614ac934ba20ca4635>>
7
+ * @generated SignedSource<<ef31518f0fe8ff6f6a5c15936cab9d87>>
8
8
  */
9
9
 
10
10
  /**
@@ -121,6 +121,8 @@ public interface ReactNativeFeatureFlagsProvider {
121
121
 
122
122
  @DoNotStrip public fun hideOffscreenVirtualViewsOnIOS(): Boolean
123
123
 
124
+ @DoNotStrip public fun overrideBySynchronousMountPropsAtMountingAndroid(): Boolean
125
+
124
126
  @DoNotStrip public fun perfMonitorV2Enabled(): Boolean
125
127
 
126
128
  @DoNotStrip public fun preparedTextCacheSize(): Double
@@ -15,6 +15,6 @@ public object ReactNativeVersion {
15
15
  "major" to 0,
16
16
  "minor" to 83,
17
17
  "patch" to 0,
18
- "prerelease" to "nightly-20250905-a50ddf3d8"
18
+ "prerelease" to "nightly-20250907-02e3a999e"
19
19
  )
20
20
  }
@@ -102,7 +102,7 @@ lastResort(const char* tag, const char* msg, const char* arg = nullptr) {
102
102
  }
103
103
  #else
104
104
  std::cerr << msg;
105
- if (arg) {
105
+ if (arg != nullptr) {
106
106
  std::cerr << ": " << arg;
107
107
  }
108
108
  std::cerr << std::endl;
@@ -60,7 +60,8 @@ static std::unordered_map<int, std::string> responseBuffers;
60
60
 
61
61
  /* static */ jboolean JInspectorNetworkReporter::isDebuggingEnabled(
62
62
  jni::alias_ref<jclass> /*unused*/) {
63
- return NetworkReporter::getInstance().isDebuggingEnabled();
63
+ return static_cast<jboolean>(
64
+ NetworkReporter::getInstance().isDebuggingEnabled());
64
65
  }
65
66
 
66
67
  /* static */ void JInspectorNetworkReporter::reportRequestStart(
@@ -138,7 +139,7 @@ static std::unordered_map<int, std::string> responseBuffers;
138
139
  jint requestId,
139
140
  jboolean cancelled) {
140
141
  NetworkReporter::getInstance().reportRequestFailed(
141
- std::to_string(requestId), cancelled);
142
+ std::to_string(requestId), cancelled != 0u);
142
143
  }
143
144
 
144
145
  /* static */ void JInspectorNetworkReporter::maybeStoreResponseBodyImpl(