Open markerikson opened 2 days ago
Open the branch in Web Editor • VS Code • Insiders
Open Preview
Name | Link |
---|---|
Latest commit | 311f31c1927fdb4d8c8369e0a9933b693951f8cf |
Latest deploy log | https://app.netlify.com/sites/redux-starter-kit-docs/deploys/674277d99b5e7800089334db |
Deploy Preview | https://deploy-preview-4732--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 configuration.
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 311f31c1927fdb4d8c8369e0a9933b693951f8cf:
Sandbox | Source |
---|---|
@examples-query-react/basic | Configuration |
@examples-query-react/advanced | Configuration |
@examples-action-listener/counter | Configuration |
rtk-esm-cra | Configuration |
Path | Size |
---|---|
1. entry point: @reduxjs/toolkit/query/react (cjs, production.min.cjs) | 24.45 KB (-0.34% π½) |
2. entry point: @reduxjs/toolkit/query/react (without dependencies) (cjs, production.min.cjs) | 2.87 KB (+0.28% πΊ) |
3. createApi (react) (.modern.mjs) | 15.66 KB (+0.06% πΊ) |
This PR:
isSuccess
, such that we don't flip fromfalse
totrue
temporarily when refetching after an errorFixes #4240
Investigation
Per #4240, if you have a sequence where:
the observed behavior is:
The issue is that
isSuccess
wasfalse
when the first refetch settled, but then flips totrue
when we start the second refetch. This does seem unintuitive and buggy.Similar to #4731 , I think the logic for calculating
isSuccess
isn't sufficient. In this case:Given that, I think the right thing to do is include
&& !lastResult?.isError
, leaving us with:I see that flip the second refetch case to stay with
isSuccess: false
as I'd hope.