Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

redux-requests

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

redux-requests - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc