Skip to content

[Bug]: Resetting Suspense boundaries on navigation not work #8325

@GuichiZhao

Description

@GuichiZhao

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions