Skip to main content
Version: 7.3


NetworkManager orchestrates asynchronous fetches. By keeping track of all in-flight requests it is able to dedupe identical requests if they are made using the throttle flag.


NetworkManager implements Manager


constructor(dataExpiryLength = 60000, errorExpiryLength = 1000)

Arguments represent the default time (in miliseconds) before a resource is considered 'stale'.


Consumed Actions

Will initiate network request and then dispatch upon completion.

Processed Actions

Dispatched Actions

allSettled(): Promise

Resolves once all fetches inflight are complete. Conceptually Promise.allSettled


Used by DevtoolsManager to determine whether to log an action


skipLogging(action: ActionTypes) {
return action.type === FETCH_TYPE && action.meta.key in this.fetched;

Protected members


Called when middleware intercepts 'rest-hooks/fetch' action.

Will then start a promise for a key and potentially start the network fetch.

Uses throttle only when instructed by action meta. This is valuable for ensures mutation requests always go through.


Called when middleware intercepts a receive action.

Will resolve the promise associated with receive key.

throttle(key, fetch)

Ensures only one request for a given key is in flight at any time

Uses key to either retrieve in-flight promise, or if not create a new promise and call fetch.

getLastReset(): number

Timestamp when entire store was last reset


Clear promise state for a given key


Ensures all promises are completed by rejecting remaining