redux-toolkit icon indicating copy to clipboard operation
redux-toolkit copied to clipboard

return promise from query result & hook `refetch`

Open phryneas opened this issue 3 years ago • 4 comments

See #1939. I'll update tests later.

phryneas avatar Apr 07 '22 06:04 phryneas

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

codesandbox-ci[bot] avatar Apr 07 '22 06:04 codesandbox-ci[bot]

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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] avatar Apr 07 '22 06:04 netlify[bot]

This would be useful when incorporating RTKQuery into an existing codebase with some existing imperative fetching logic. Looking forward to this being merged :)

joel1st avatar Apr 28 '22 05:04 joel1st

Looking forward to this being merged :)

kahirokunn avatar Jun 11 '22 02:06 kahirokunn

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.

Juneezee avatar Nov 30 '22 12:11 Juneezee