fix(recyclerview): prevent orphaned pending child layouts#2378
Open
wanxiankai wants to merge 1 commit into
Open
fix(recyclerview): prevent orphaned pending child layouts#2378wanxiankai wants to merge 1 commit into
wanxiankai wants to merge 1 commit into
Conversation
Author
|
I have signed the CLA! |
wanxiankai
marked this pull request as ready for review
July 13, 2026 15:11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes #2319
Move nested
RecyclerViewpending-layout registration from the render phase to a layout effect. This prevents interrupted or otherwise discarded renders from adding an ID to the parent list'spendingChildIdsset without a matching commit that can remove it.Add an unmount cleanup that releases the child ID when a nested list is removed before its first layout completes. The existing horizontal-list early-unmark behavior remains intact by skipping the commit-phase mark once a horizontal child already has a measured height.
Without these changes, an orphaned ID can make the parent list's relayout effect return early on every later commit, leaving item offsets and content size permanently stale until the parent remounts.
Reviewers’ hat-rack 🎩
Screenshots or videos (if needed)
Not applicable; this changes layout lifecycle coordination without a deterministic visual state.
Testing
yarn test --runInBand(14 suites, 189 tests)yarn lintyarn type-checkyarn build