Skip to content

[DO NOT MERGE] Repro for #60140: recycled view keeps its custom container (iOS) - #60141

Open
marvin-splitt wants to merge 1 commit into
react:mainfrom
marvin-splitt:repro-recycled-container-order
Open

marvin-splitt wants to merge 1 commit into
react:mainfrom
marvin-splitt:repro-recycled-container-order

Conversation

@marvin-splitt

Copy link
Copy Markdown

Summary:

Reproducer only, not meant to be merged. It reproduces #60140: a recycled RCTViewComponentView keeps _useCustomContainerView from its previous owner (a view with overflow: 'hidden' + boxShadow). On iOS, the new owner's children then end up in the wrong subview order, and the next index-based unmount asserts Attempt to unmount a view which has a different index.

RNTesterPlayground.js now holds a four-tap screen:

  1. Unmounts a View with overflow: 'hidden' + boxShadow, so its native view goes to the recycle pool.
  2. Mounts a bordered View (collapsable={false}, borderTopWidth) with two absolutely positioned children. It dequeues the recycled view and mounts the children through the stale container.
  3. Replaces the second child (new key). It lands behind the first one: the green square is hidden under the red box.
  4. Replaces it again. Removing the previous one asserts in debug builds.

Changelog:

[INTERNAL] [ADDED] - Playground reproducer for #60140

Test Plan:

I ran the same component (same styles and steps) as a screen in an Expo SDK 58 dev client on RN 0.88.1 (prebuilt core), iOS 27.0 simulator, debug:

  • Steps as above: step 3 hides the green square, step 4 terminates with NSInternalInconsistencyException: Attempt to unmount a view which has a different index. 2 of 2 runs.
  • Control, boxShadow removed from the first view: all four steps render correctly, no assertion.

I haven't run it in RNTester on main. Reading the code, main still lacks the recycle reset; debaf42 (#59628) doesn't change where the children end up.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@meta-cla

meta-cla Bot commented Nov 19, 2026

Copy link
Copy Markdown

Hi @marvin-splitt!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 19, 2026
@meta-cla

meta-cla Bot commented Nov 19, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@facebook-github-tools facebook-github-tools Bot added the Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team. label Nov 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Shared with Meta Applied via automation to indicate that an Issue or Pull Request has been shared with the team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant