Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onSuccess, onSettled do not work in svelte-query #7229

Closed
halafi opened this issue Apr 5, 2024 · 1 comment
Closed

onSuccess, onSettled do not work in svelte-query #7229

halafi opened this issue Apr 5, 2024 · 1 comment

Comments

@halafi
Copy link

halafi commented Apr 5, 2024

Describe the bug

Although the docs do not cover onSuccess, it was working in ^4.35.3 and I do not see any mention of deprecation (actually saw it used in some example)

Your minimal, reproducible example

see below

Steps to reproduce

  const assistantsQuery = createQuery({
    enabled: true,
    ...
    onSuccess: () => {
      console.log("hi") // not happening
    }
  });

Expected behavior

onSuccess should work, so should on settled if the network endpoint finishes

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

macOS

Tanstack Query adapter

svelte-query

TanStack Query version

5.28.13

TypeScript version

vanilla js

Additional context

No response

@halafi halafi changed the title onSuccess does not work in svelte-query onSuccess, onSettled do not work in svelte-query Apr 5, 2024
@halafi
Copy link
Author

halafi commented Apr 5, 2024

I guess this will be related to https://barrymichaeldoyle.com/blog/tanstack-v5 so not a bug, but a feature

@halafi halafi closed this as completed Apr 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant