-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix(examples, docs): ignored promise from invalidate queries #8847
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
fix(examples, docs): ignored promise from invalidate queries #8847
Conversation
624b3b1
to
1875663
Compare
cde6864
to
3bfb5d6
Compare
the promise in the current code is not ignored:
this code returns the promise from Wrapping this in |
Thank you @TkDodo for your feedback on my pull request. While it's true that arrow functions without braces return the result of their expression, I encountered issues with the code's behaviour, especially when arrow functions have curly braces. In those cases, an explicit |
yes because then you don’t return a Promise from the function. This is just how javascript works. You can return a Promise, or not. You can use arrow functions or not. You can write the same thing in a million ways
|
…in optimistic-updates-cache example
…optimistic-updates-ui example
…mistic-updates documentation
3bfb5d6
to
5b7f8ec
Compare
Co-authored-by: Dominik Dorfmeister <[email protected]>
…yntax in all onSettled callbacks
View your CI Pipeline Execution ↗ for commit b8a3821.
☁️ Nx Cloud last updated this comment at |
This PR fixes the issue of Promise returned from invalidateQueries being ignored in documentation and examples