redux-requests
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "redux-requests", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Manages in-flight requests with a Redux reducer - avoid issuing duplicate requests without any special logic!", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -222,3 +222,12 @@ redux-requests [![Version][npm-image]][npm-url] | ||
### `attemptRequest(url, actions, makeRequest, dispatch)` | ||
Helper function to reduce boilerplate when issuing a request, while still allowing full control over the way in which the request is made/handled. | ||
- `url` is the unique URL for this request. | ||
- `actions` should be an object with `begin`, `success`, and `failure` methods; each of which return an Action object (but do not need to include the `meta.httpRequest` information, as that will be added automatically). | ||
- `makeRequest` should return a `Promise` (how you make/handle the request is up to you). | ||
- `dispatch` is function called when an Action is triggered (typically this will be the standard Redux store's `dispatch` method). | ||
## Credits | ||
@@ -225,0 +234,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16700
241