-
-
Notifications
You must be signed in to change notification settings - Fork 639
Add a hook after query #2424
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestopenapi-react-queryRelevant to openapi-react-queryRelevant to openapi-react-query
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestopenapi-react-queryRelevant to openapi-react-queryRelevant to openapi-react-query
Description
https://tkdodo.eu/blog/breaking-react-querys-api-on-purpose
tanstack query will deprecate onSuccess/onError/onSettled hook, partially because the query function already contains side effects and some side effects can be executed there. However, with openapi-react-query, the query function is already handled automatically. Is it possible to provide an additional callback after the query is done?
Proposal
Add a hook function onQuerySettled to all the function options.
Extra