stowball / dummys-guide-to-redux-and-thunk-react

Tutorial post
https://medium.com/@stowball/a-dummys-guide-to-redux-and-thunk-in-react-d8904a7005d3#.44hlq3vvt
321 stars 144 forks source link

[Question] What would be a nice approach for caching the fetched response? #3

Open zomars opened 6 years ago

stowball commented 6 years ago

In real life (not using the mock API service), the browser will cache the response, but you'll obviously still get subsequent fetch requests (which will return immediately). You could store responses in SessionStorage or LocalStorage and check for their existence there, or put it in a Redux store.