Created
January 11, 2019 13:16
-
-
Save mfrachet/550b68a8dc96f0e2f55012079e6ca588 to your computer and use it in GitHub Desktop.
react-cache-fetchwithcache
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let cache; | |
| export const customFetch = url => /* we already implemented this */ | |
| export const fetchWithCache = url => | |
| window | |
| .fetch(url) | |
| .then(res => res.json()) | |
| .then(data => { | |
| cache = data; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment