T
TanStack•3y ago
exotic-emerald

Suspense example has a bug?

In this example https://tanstack.com/query/latest/docs/react/examples/react/suspense it never shows "Loading projects..." even though it has that in line 73 in the sandbox:
<React.Suspense fallback={<h1>Loading projects...</h1>}>
// ...
<React.Suspense fallback={<h1>Loading projects...</h1>}>
// ...
1 Reply
xenial-black
xenial-black•3y ago
the buttons use startTransition, so react doesn't show the suspense boundary. remove startTransition from Button.jsx to see it the example should probably only have a transition for the load buttons of each individual project, not for the "all projects" as well if you want, you can contribute that change 🙂

Did you find this page helpful?