async-fetch 0.2.2 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/package.json +2 -1
- package/useAsyncFetch.js +1 -1
package/README.md
CHANGED
|
@@ -77,3 +77,7 @@ The minimum requirement for the hook is a url string as the first argument. The
|
|
|
77
77
|
| data | Any | The response data. |
|
|
78
78
|
| sendRequest | Function | Function to send the request manually. |
|
|
79
79
|
| cancelRequest | Function | Function to cancel the request manually. |
|
|
80
|
+
|
|
81
|
+
### Next.js
|
|
82
|
+
|
|
83
|
+
For the hook to work properly in a Next.js project you must turn `reactStrictMode` to false in your `next.config.js`.
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "async-fetch",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.4",
|
|
4
4
|
"description": "Use fetch asynchronously for requests within React components.",
|
|
5
5
|
"main": "useAsyncFetch.js",
|
|
6
|
+
"type": "module",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
8
9
|
},
|
package/useAsyncFetch.js
CHANGED