- When http response isn't received (status code = 0), request is always & infinitely retried.
- When http response is other than 5xx, request is never retried.
- User can specify explicitly whether a request is retryable or not through options
{ retryable: true }
; whenever options are specified, it's considered and default behaviour is ignored.
import fetch from '@dreamworld/fetch';
// store.js
import { initRedux as initFetchRequestRedux } from '@dreamworld/fetch';
initFetchRequestRedux(store);
// Get Pending writes / reads.
import * as fetchSelectors from '@dreamworld/fetch/selectors.js';
fetchSelectors.pendingWrites(state); // { 5AqmtnIKAReGLCeUFcvj5b: 1689319833142, ... }
fetchSelectors.pendingReads(state); // { 9BqmtnIKAReGLCeUFcvj5b: 1689319833142, ... }