Pernicious little bug that was causing me hassles. Not sure of the best way to fix this, but this does solve the problem...
useCall is a hook, so we expect keys to change and have the result change as well. As written in master, while we handle key changes (with deepmemo), we actually return the previous result before calling doFetch. We not only return the old result, but we set the cache with the new key to the old result!
Note: I think this affects all the hooks that use this pattern...
Pernicious little bug that was causing me hassles. Not sure of the best way to fix this, but this does solve the problem...
useCall
is a hook, so we expect keys to change and have the result change as well. As written in master, while we handle key changes (with deepmemo), we actually return the previous result before callingdoFetch
. We not only return the old result, but we set the cache with the new key to the old result!Note: I think this affects all the hooks that use this pattern...