Skip to content

fix(recycling): disable key reuse when pool limit is zero - #2467

Open
huytdps13400 wants to merge 1 commit into
Shopify:mainfrom
huytdps13400:fix/issue-2462-disable-recycle-pool
Open

fix(recycling): disable key reuse when pool limit is zero#2467
huytdps13400 wants to merge 1 commit into
Shopify:mainfrom
huytdps13400:fix/issue-2462-disable-recycle-pool

Conversation

@huytdps13400

Copy link
Copy Markdown

Description

Treats a zero recycle-pool limit as a request to disable recycling before keys can be reused during the same render-stack sync. This keeps scrolled-off item instances from being reassigned while preserving the existing layout-animation recycling override and positive pool limits.

Fixes #2462

Reviewers' hat-rack 🎩

Please focus on the combined recycling-disabled predicate and the scroll-window regression in RenderStackManager.test.ts.

Screenshots or videos

Not applicable; this is an internal key-lifecycle fix covered by a focused render-stack regression test.

Test plan

  • Unit tests pass (yarn test --forceExit) — 14 suites, 188 tests
  • Focused regression passes (yarn test src/__tests__/RenderStackManager.test.ts --runInBand) — 20 tests
  • Type check passes (yarn type-check)
  • Lint passes (yarn lint)
  • Build passes (yarn build)
  • Device verification — agent-device and the fixture app are unavailable in this environment

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

maxItemsInRecyclePool=0 does not disable recycling

1 participant