fix(recycling): disable removeClippedSubviews to prevent Android crash#2202
Merged
Merged
Conversation
On Android with Fabric (New Architecture), the native removeClippedSubviews optimization can detach views that FlashList has buffered off-screen via absolute positioning. When FlashList recycles those views back on-screen, Fabric cannot find their view state, causing the Unable to find viewState for tag crash. FlashList v2 manages its own view recycling through key reuse and absolute positioning, so the native clipping optimization is both unnecessary and harmful. This explicitly disables removeClippedSubviews on the ScrollView and the item container to prevent the conflict. Fixes #1914
Collaborator
|
@agent Let's place the removeCLipped prop above override so that people can disable or enable if they want. Update the PR |
Contributor
|
Claude finished @naqvitalha's task in 51s —— View job Updating
|
Move removeClippedSubviews={false} above {...overrideProps} so users can
override the default if needed.
Fixes #1914
Co-authored-by: Talha Naqvi <naqvitalha@users.noreply.github.com>
1 task
claude-code-action injects Co-authored-by trailers for the trigger user into commits. This is unwanted — agent commits should have no co-author attribution. Override via system prompt in all commit-capable workflows.
…rCollection Only needed on the outer ScrollView, not the inner container.
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
On Android with Fabric (New Architecture), the native
removeClippedSubviewsoptimization can detach views that FlashList has buffered off-screen via absolute positioning. When FlashList then recycles those views back on-screen, Fabric cannot find their view state, causing the "Unable to find viewState for tag" crash.This fix explicitly disables
removeClippedSubviewson the ScrollView and the item container view. FlashList v2 manages its own view recycling through key reuse and absolute positioning, so the native clipping optimization is both unnecessary and harmful.Fixes #1914
Reviewers' hat-rack 🎩
removeClippedSubviews={false}is placed after{...overrideProps}on the ScrollView to ensure it cannot be accidentally re-enabled by user props.removeClippedSubviews.Test plan
yarn test)yarn type-check)yarn lint)