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

ESLint error onSuccess callback: Promise-returning function provided to property where a void return was expected #8087

Open
tgdn opened this issue Sep 23, 2024 · 0 comments

Comments

@tgdn
Copy link

tgdn commented Sep 23, 2024

Describe the bug

Following this article, I'm returning a promise in the onSuccess callback. Since the callback signature should return void, it cannot return a promise and causes the following ESLint error.

Promise-returning function provided to property where a void return was expected

Image

Image

Steps to reproduce

Return a promise from a within the onSuccess callback.

Expected behavior

I should be able to return a promise from within the onSuccess callback.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome

Tanstack Query adapter

react-query

TanStack Query version

v5.35.5

TypeScript version

v5.4.5

Additional context

No response

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