Comparing version 1.3.0 to 1.4.0
{ | ||
"_from": "redux-nl", | ||
"_id": "redux-nl@0.1.14", | ||
"_inBundle": false, | ||
@@ -37,3 +36,3 @@ "_integrity": "sha512-nH4sbHMnUjdo8UcqYL5TWHTueoBQhiiFN73XJ96lzM6oHSOw9B6FtrdVcFO0vejYbIsmGqHl2vfdRSIYAzgfFQ==", | ||
}, | ||
"bundleDependencies": false, | ||
"bundleDependencies": [], | ||
"dependencies": { | ||
@@ -75,3 +74,3 @@ "axios": "^0.19.2", | ||
}, | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"devDependencies": { | ||
@@ -78,0 +77,0 @@ "@redux-saga/types": "^1.1.0", |
@@ -148,3 +148,3 @@ <p align="center"> | ||
apiToken: "...", | ||
}, | ||
} | ||
}); | ||
@@ -212,4 +212,22 @@ ``` | ||
#### Replace Type (Without Route Parameters) | ||
For APIs without route parameters (i.e. APIs with no path), include a `replaceType` to differentiate the action type. i.e. | ||
```js | ||
ReduxNl.post("", { | ||
payload: { | ||
hasCredit: false, | ||
}, | ||
meta: { | ||
apiToken: "...", | ||
}, | ||
replaceType: "login" | ||
}); | ||
``` | ||
This will dispatch a `CreateLoginResponse` to the store once and you can listen to this action in your reducer. | ||
### Resources | ||
See [extract-your-api-to-a-client-side-library-using-redux-saga](https://medium.com/@lukebrandonfarrell/network-layer-extract-your-api-to-a-client-side-library-using-redux-saga-514fecfe34a7) to learn more about the architecture behind this library. |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
48919
232