forceUpdate does not work with axios 0.19
See original GitHub issueI’m using request options to force axios-extensions to update cache entries when needed.
This has been working fine with axios 0.18.0 (and 0.18.1) but when I recently updated to 0.19.0 I noticed that forceUpdate does not have effect anymore. Data is still returned from cache.
package.json:
"axios": "^0.19.0",
"axios-extensions": "^3.0.6",
Code:
const requestOptions = {
params: {
_format: 'json',
},
forceUpdate: cacheIsBypassed,
};
const {data} = await cachedAxios.get(requestUrl, requestOptions);
For now the resolution was reverting back to 0.18.1 but for going forward it would be good to make axios-extensions to work fully with axios 0.19 too.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
React setState in an axios call after switching pages quickly
Flow-> Mounted->Axios call->Unmount->Mount->Response received. In my case while receiving response the component is mounted but remember as ...
Read more >React setState in an axios call after switching pages quickly ...
Why does my Auth.currentAuthenticatedUser() method return updated state after I reload and not when the useEffect's dependency runs (or login/logout)? · How to ......
Read more >React (forked) - StackBlitz
Starter project for React apps that exports to the create-react-app CLI.
Read more >its instance type is not a valid jsx element - You.com | The search ...
It seems like @types/react problem with multiple versions. ... context, setState, forceUpdate, and 3 more.ts(2 `import { HelmetProvider } from ...
Read more >chunk-vendors.0323267d.js.map
node_modules/_axios@0.19.2@axios/lib/helpers/parseHeaders.js","webpack:///. ... node_modules/_core-js@3.6.4@core-js/internals/object-property-is-enumerable.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Seems that was a bug/breaking change with axios v0.19.0, see https://github.com/axios/axios/pull/2207
Maybe I should add a comment on README about this before the bug fixed by axios.
I understand, thank you.