T
TanStack7mo ago
harsh-harlequin

Is it possible to keepPreviousData when using a deferred loader?

I have a case where I'm using a deferred loader, but I want to hang on to the previous data and render a loading overlay on top of my already-rendered page instead of wiping it out completely. I've searched the docs and couldn't find anything that made this seem possible.
3 Replies
fair-rose
fair-rose7mo ago
you're not using tanstack-query I guess? We're talking just router, right?
harsh-harlequin
harsh-harlequinOP7mo ago
right, i was hoping for a router-only solution. I thought the router had a form of tanstack-query built-in so i assumed it would be straightforward but i guess not.
fair-rose
fair-rose7mo ago
I think the router would need to fully support react transitions to get there

Did you find this page helpful?