'error' stays true in 'options change detection' example
rohan-rest-art opened this issue · comments
rohan-rest-art commented
The examples block contains a link 'Options change detection':
https://codesandbox.io/s/axios-hooks-options-change-v23tl
I found an issue in this example.
How to reproduce:
- Follow the link above.
- Submit a request with user id '1'.
- Shows data for user id '1'. Works good.
- Submit a request with user id '2'.
- Shows data for user id '2'. Works good.
- Submit a request with user id '2222222222222222'.
- Shows an error and data for user id '2'. Why hasn't 'data' changed? Looks weird but ok.
- Submit a request with user id '1' again.
- Shows an error and data for user id '1'. Why is 'error' still truthy?
Probably the issue has the same cause as #372
Simone Busoli commented
Thanks for reporting this. This looks like a bug in the cache. Would you like to submit a PR to fix it?
Tom Ceuppens commented
Its still a bug and a pretty annoying one. :/
Simone Busoli commented
This is now fixed, lmk if the new version works for you