Skip to content

Add a hook after query #2424

@yf-yang

Description

@yf-yang

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions