redux-toolkit
redux-toolkit copied to clipboard
return promise from query result & hook `refetch`
See #1939. I'll update tests later.
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 737e03949a496f77f5b4327c6c09a0b3d374e05c:
| Sandbox | Source |
|---|---|
| Vanilla | Configuration |
| Vanilla Typescript | Configuration |
| rsk-github-issues-example | Configuration |
| @examples-query-react/basic | Configuration |
| @examples-query-react/advanced | Configuration |
| @examples-action-listener/counter | Configuration |
Deploy Preview for redux-starter-kit-docs ready!
| Name | Link |
|---|---|
| Latest commit | 776e24f7303b4c524fc511098f78977432c79afb |
| Latest deploy log | https://app.netlify.com/sites/redux-starter-kit-docs/deploys/624eeb81d4d30300084d3d9d |
| Deploy Preview | https://deploy-preview-2212--redux-starter-kit-docs.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
This would be useful when incorporating RTKQuery into an existing codebase with some existing imperative fetching logic. Looking forward to this being merged :)
Looking forward to this being merged :)
We should also update the type of refetch in this page https://github.com/reduxjs/redux-toolkit/blob/c663ba24edbff6aed69a9effc2eda7738e219ffb/docs/rtk-query/api/created-api/hooks.mdx. refetch now returns a Promise since v1.9.0. The refetch: () => void is outdated.