Basic cache /context example doesn't seem to work
andycloke opened this issue · comments
Andy Cloke commented
sorry if I'm missing something dumb, but as I understand it if I use the 'basic caching' example the network request shouldnt be made a second time. I used the exact example from here https://github.com/jxom/react-loads#basic-cache
"react-loads": "^8.3.4",
"axios": "^0.19.0",
"typescript": "3.5.3"
and the network request is made each time, i.e. it's not cached:
Andy Cloke commented
I missed this. doh!
I needed to wrap the app https://github.com/jxom/react-loads#firstly
and use loadPolicy: 'cache-first'
jxom commented
Maybe I should make this more clearer in the docs! :)