fenextjs-hook
Advanced tools
Comparing version 1.2.36 to 1.2.37
@@ -23,2 +23,3 @@ import { RequestProps, RequestResultDataProps, RequestResultTypeProps } from "fenextjs-interface/cjs/Request"; | ||
result: RequestResultDataProps<R, E, T> | undefined; | ||
resultValue: R | undefined; | ||
loader: boolean; | ||
@@ -25,0 +26,0 @@ error: E | undefined; |
@@ -19,2 +19,3 @@ "use strict"; | ||
const [result, setResult] = (0, react_1.useState)(undefined); | ||
const [resultValue, setResultValue] = (0, react_1.useState)(undefined); | ||
const [loader, setLoader] = (0, react_1.useState)(false); | ||
@@ -26,2 +27,3 @@ const onRequest = (0, react_1.useCallback)(async () => { | ||
const respond = await request(query); | ||
setResultValue(respond.result); | ||
setResult(respond); | ||
@@ -41,2 +43,3 @@ } | ||
result, | ||
resultValue, | ||
loader, | ||
@@ -43,0 +46,0 @@ error, |
@@ -23,2 +23,3 @@ import { RequestProps, RequestResultDataProps, RequestResultTypeProps } from "fenextjs-interface/cjs/Request"; | ||
result: RequestResultDataProps<R, E, T> | undefined; | ||
resultValue: R | undefined; | ||
loader: boolean; | ||
@@ -25,0 +26,0 @@ error: E | undefined; |
@@ -16,2 +16,3 @@ import { useCallback, useEffect, useState } from "react"; | ||
const [result, setResult] = useState(undefined); | ||
const [resultValue, setResultValue] = useState(undefined); | ||
const [loader, setLoader] = useState(false); | ||
@@ -23,2 +24,3 @@ const onRequest = useCallback(async () => { | ||
const respond = await request(query); | ||
setResultValue(respond.result); | ||
setResult(respond); | ||
@@ -38,2 +40,3 @@ } | ||
result, | ||
resultValue, | ||
loader, | ||
@@ -40,0 +43,0 @@ error, |
{ | ||
"name": "fenextjs-hook", | ||
"version": "1.2.36", | ||
"version": "1.2.37", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
104018
1969