Can we keep previous data longer..?
I'm building a pagination feature using react-query.
keepPreviousData is an amazing feature to me, but it's not enough for this time. I want to keep old data until I finish making some changes right after API fetching/refetching.
for example..
Here's what I tried: I created new state to hold old data.
but.. could anyone share some workarounds to do this using react-query only?2 Replies
ambitious-aqua•4y ago
Whatever you are doing in onSuccess should likely be done directly in the queryFn
rare-sapphireOP•4y ago
Oh! Thx a lot!