T
TanStack3h ago
conscious-sapphire

How to get pending component to show instead of stale data with loader + query

Currently when loading data with ensureQueryData + useSuspenseQuery it will show the loading component the on first load. However if the query is invalidated, subsequent loads show the stale data instead of the pending component again. The route is also not preloaded the second time. I'd like to show the pending component to avoid showing stale data, as well as allow the route to preload.
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?