diff --git a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java index 72b640e0bbb4b0..63b79a4d2228aa 100644 --- a/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java +++ b/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.java @@ -222,9 +222,20 @@ private void addRootView(@NonNull final View rootView) { if (rootView instanceof ReactRoot) { ((ReactRoot) rootView).setRootViewTag(mSurfaceId); } - mRootViewAttached = true; + + if (!ReactNativeFeatureFlags.forceBatchingMountItemsOnAndroid()) { + mRootViewAttached = true; + } executeMountItemsOnViewAttach(); + + if (ReactNativeFeatureFlags.forceBatchingMountItemsOnAndroid()) { + // By doing this after `executeMountItemsOnViewAttach`, we ensure + // that any operations scheduled while processing this queue are + // also added to the queue, instead of being processed immediately + // through the queue in `MountItemDispatcher`. + mRootViewAttached = true; + } }; if (UiThreadUtil.isOnUiThread()) {