Ho to enhance previous response. Now that the on success is not accessible.
I have some data that i get as an array and want to transform and save in the below format.
Now on the next page I will receive X next items, but i want to transform them and enhance the existent state so now page is updated, and the posts contains 10 new keys. How do you do this now that the onSuccess is removed from the useQuery
2 Replies
reduced-jade•3y ago
Can't this be done in the
select callback? And if this needs to be shared to several "mounting-points" of the query, have you considered putting the parsing inside the queryFn?vicious-goldOP•3y ago
I figured it out actually, doing things with the queryFn. and accessing the previous response there. Cheers