0.1.0 • Published 6 years ago
redux-fetch-utils v0.1.0
redux-fetch-utils
Utils for fetching data with Redux.
Installation
yarn add redux-fetch-utils
The Gist
import { invalidateFetchedData, shouldFetchData } from 'redux-fetch-utils';
const state = {
response: { error: 'old response data' },
didInvalidate: false,
isFetching: false,
};
// use this in your reducer
const newState = invalidateFetchedData(state);
// before fetching new data use this to check if data should be fetched
const shouldFetchDataForNewState = shouldFetchData(newState);
License
MIT
0.1.0
6 years ago
0.0.2
7 years ago
0.0.1
7 years ago
0.0.1-rc.3
7 years ago
0.0.1-rc.2
7 years ago
0.0.1-rc.1
7 years ago
0.0.1-rc.0
7 years ago