import Fetch from 'react-native-http-datacache';
const result = Fetch('http://test');
const cache = result.next(); // 缓存的数据: promise type
const data = result.next(); // api的数据 : promise type
cache.value && cache.value
.then(res => console.log('data from cache: ', res))
data.value && data.value
.then(res => console.log('data from api: ', res))
This package has been deprecated
Author message:
abandon
react-native-http-datacache
1.0.0 • Public • PublishedReadme
Keywords
nonePackage Sidebar
Install
npm i react-native-http-datacache
Weekly Downloads
1
Version
1.0.0
License
MIT