Skip to content

Instantly share code, notes, and snippets.

@emanueleDiVizio
Created June 9, 2020 14:46
Show Gist options
  • Save emanueleDiVizio/6a919fe2c1f1cf0765674cea3a209f51 to your computer and use it in GitHub Desktop.
Save emanueleDiVizio/6a919fe2c1f1cf0765674cea3a209f51 to your computer and use it in GitHub Desktop.
createNetworkMiddleware(config: MiddlewareConfig): ReduxMiddleware
type MiddlewareConfig = {
regexActionType?: RegExp = /FETCH.*REQUEST/,
actionTypes?: Array<string> = [],
queueReleaseThrottle?: number = 50,
shouldDequeueSelector: (state: RootReduxState) => boolean = () => true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment