[Bug]: Resetting Suspense boundaries on navigation not work
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.8k
- Forks
- 7.9k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 11
Description
Summary
Resetting Suspense boundaries on navigation not work
Page
https://react.dev/reference/react/Suspense
Details
I come up with an example as the documentation says:
However, now imagine you’re navigating between two different user profiles. In that case, it makes sense to show the fallback. For example, one user’s timeline is different content from another user’s timeline. By specifying a key, you ensure that React treats different users’ profiles as different components, and resets the Suspense boundaries during navigation. Suspense-integrated routers should do this automatically.
https://codesandbox.io/p/sandbox/react-dev-forked-4fszvr?file=%2Fsrc%2FApp.js
However, key do not work as expect, i.e. I did not see a loading indicator
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
Start with the Suspense reference page and run the linked CodeSandbox reproduction in src/App.js. Compare the observed navigation behavior with the page’s statement about key resetting Suspense boundaries, then determine whether the example or the documentation needs correction. Done means the reported discrepancy is reproduced and the page or example accurately reflects the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- documentation, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100