[Suggestion]: Cap the height of the artificially-slow example output (useDeferredValue / useTransition)
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript, react
- Domain
- documentation
Research direction
Start with the examples on the useDeferredValue and useTransition reference pages and inspect how SlowList and SlowPost render their output. Cap the visible output height with scrolling while preserving the existing item counts and intentional slowdown, then verify both pages no longer expand excessively.
Written by the indexing model from the issue text.
Description
Summary
When you view the example's rendered output in full, the SlowList/SlowPost demos expand into hundreds of identical rows, which is more than anyone needs to scroll through. The output height should be capped (e.g. max-height + scroll) while keeping the item counts that create the intentional slowdown.
Page
https://react.dev/reference/react/useDeferredValue
https://react.dev/reference/react/useTransition
Details
The point of these demos is felt within the first few rows — you just need to see the list "lag behind" the input. But the rendered output shows the full list, so viewing it expands the example to hundreds of identical "Text:" rows and pushes the rest of the docs far down. The number of rows differs across pages (250 / 500 / 50), so the problem shows up unevenly.
- Dominant language
- JavaScript
- Stars
- 11.8k
- Forks
- 7.9k
- Avg merge
- 16h 6m
- Merged PRs (30d)
- 7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from reactjs/react.dev
-
type: documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
bug: unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
type: typos
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
bug: unconfirmed
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
All issues in reactjs/react.dev
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·