Skip to content

docs(List): add performance guidance for items, modals and batches - #3527

Merged
Lisa18289 merged 1 commit into
nextfrom
claude/docs-list-performance
Oct 21, 2026
Merged

Lisa18289 merged 1 commit into
nextfrom
claude/docs-list-performance

Conversation

@mfal

@mfal mfal commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

Adds performance guidance for List users: a new Performance section on the List page, a Best Practices bullet that points to it, and one line in USAGE.md so agents in consumer repos find it without opening the List page first.

Targets next: the guidance builds on renderDependencies from #3526, which exists only there.

What the section says

  • Items with renderDependencies. An inline render function re-renders every item on every parent render. With renderDependencies on List.Item / List.TableRow, an item re-renders only when its data or a listed value changes; [] when the render function reads nothing but the item. Rules: list every outside value, keep listed values stable (useCallback/useMemo), keep data stable. Details link to the existing "Item-Inhalte und externer State" section instead of repeating it.
  • Modals and context menus. A closed Modal renders nothing until opened, but its controller and whatever the app wraps around it multiply per item. Shows one shared modal at list level that receives the selected item, with renderDependencies={[edit]} and the pitfalls: do not reset the selection on close; without renderDependencies, setSelected re-renders every item.
  • Data and batches. Load data at list level, keep the batch size of 20 ("show more" and infinite scroll keep every loaded item mounted, and sort/filter/search re-render all of them), no global listeners per item.

Basis

Measured with the harness from #3524 (200 rich items, Chromium, production React):

Notes

Related: #3528 (measurement results)

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report for ./packages/components/

Status Category Percentage Covered / Total
🔵 Lines 78.27% 1416 / 1809
🔵 Statements 77.89% 1455 / 1868
🔵 Functions 72.05% 330 / 458
🔵 Branches 71.69% 760 / 1060
File CoverageNo changed files found.
Generated in workflow #7350 for commit c90c78f by the Vitest Coverage Report Action

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Preview Deployment

Preview environments are ready:

Type URL
docs pr-3527.docs.review.flow-components.de
storybook pr-3527.storybook.review.flow-components.de

Images:

  • docs: ghcr.io/mittwald/flow/docs:pr-3527
  • storybook: ghcr.io/mittwald/flow/storybook:pr-3527

A new "Performance" section on the List page, plus a Best Practices
bullet: render items as memo components, keep modals and data loading at
list level, keep the batch size of 20. USAGE.md points agents to it.

Based on the measurements in #3524: a memo item component behind an inline
render function cuts a parent re-render of 200 rich items from 181 to
117 ms; a closed Modal per item costs little, its controller and app
wrappers multiply.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mfal
mfal force-pushed the claude/docs-list-performance branch from 067c5e3 to c90c78f Compare October 20, 2026 08:14
@mfal
mfal changed the base branch from main to next October 20, 2026 08:14
@mfal
mfal marked this pull request as ready for review October 20, 2026 08:17
@mfal
mfal requested review from a team and Lisa18289 October 20, 2026 08:17
@Lisa18289
Lisa18289 merged commit df7fc3e into next Oct 21, 2026
27 of 31 checks passed
@Lisa18289
Lisa18289 deleted the claude/docs-list-performance branch October 21, 2026 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants