You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

@redux-requests/promise

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@redux-requests/promise - npm Package Compare versions

Comparing version

to
0.1.2

4

package.json
{
"name": "@redux-requests/promise",
"version": "0.1.1",
"version": "0.1.2",
"description": "Promise driver for Redux-Requests, Redux addon to simplify AJAX requests",

@@ -64,3 +64,3 @@ "main": "lib/index.js",

},
"gitHead": "622b0402b7a4f153a071af276260ad13314444b5"
"gitHead": "a2c0a5f10a3c9e3104db59e298aa3837aed0def3"
}

@@ -14,11 +14,13 @@ # @redux-requests/promise

To install the package, just run:
```bash
npm install @redux-requests/promise
```
$ npm install @redux-requests/promise
```
## Usage
This driver is useful, when you use an API library, which use promises.
This driver is useful when you work directly with promises.
For instance, you could do something like that:
```js

@@ -42,4 +44,4 @@ import { createDriver } from '@redux-requests/promise';

`AbortController` is optional, by default is will use `AbortController` is available,
with fallback to `DummyAbortController` which does nothing. If your invironment doesn't
`AbortController` is optional, by default it will use `AbortController` if available,
with fallback to `DummyAbortController` which does nothing. If your environment doesn't
support `AbortController`, you could pass a [polyfill](https://github.com/mo/abortcontroller-polyfill).

@@ -52,6 +54,6 @@ If you don't, requests abort won't work.

For usage, see [redux-saga-requests docs](https://github.com/klis87/redux-requests).
For usage, see [redux-requests docs](https://github.com/klis87/redux-requests).
Also note, that for mutations you need to pass `meta.asMutation: true` in your request actions,
so core library could know whether a request is a query or a mutation.
so the core library could know whether a request is a query or a mutation.

@@ -58,0 +60,0 @@ ## Licence