Using revealOrder="backwards" in SuspenseList only works for very short wait times
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.8k
- Forks
- 7.9k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 11
Description
I realize that this is still experimental, but I figured it would still be good to report bugs. If not, feel free to close this issue.
I was playing around with the examples in https://reactjs.org/docs/concurrent-mode-patterns.html#suspenselist and noticed that revealOrder="backwards" didn't seem to work. The trivia items never appear before the posts. After fiddling around with the example in https://codesandbox.io/s/black-wind-byilt i noticed that it works if the timeout is set around 500 ms or below for the trivia items. But if you set it to for example 1000 ms, it will instead wait until both trivia and posts are available.
revealOrder="forwards" seems to work regardless of how long the timeout is.
I tried changing React version to the latest experimental version (0.0.0-experimental-c76e4dbbc-20210722), but it did not seem to make a difference.
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.
Research direction
Reproduce the SuspenseList example from the React documentation and the linked CodeSandbox, comparing revealOrder="backwards" with 500 ms and 1000 ms trivia delays. Start by checking the reported experimental React version and the example's timeout behavior; done means the cause is identified and the backwards-order behavior is corrected or clearly addressed for longer waits.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100