react-aptor
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -1,2 +0,2 @@ | ||
import { useEffect, useImperativeHandle, useState, useRef, useCallback, } from 'react'; | ||
import { useEffect, useImperativeHandle, useState, useRef, useMemo, } from 'react'; | ||
/** | ||
@@ -19,3 +19,3 @@ * react aptor(api-connector) a hook which connect api to react itself | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
var api = useCallback(getAPI(instance, params), [instance]); | ||
var api = useMemo(function () { return getAPI(instance, params); }, [instance]); | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
@@ -22,0 +22,0 @@ useImperativeHandle(ref, api, [api]); |
@@ -21,3 +21,3 @@ "use strict"; | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
var api = react_1.useCallback(getAPI(instance, params), [instance]); | ||
var api = react_1.useMemo(function () { return getAPI(instance, params); }, [instance]); | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
@@ -24,0 +24,0 @@ react_1.useImperativeHandle(ref, api, [api]); |
{ | ||
"name": "react-aptor", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "React API connector", |
@@ -8,3 +8,3 @@ import { | ||
RefObject, | ||
useCallback, | ||
useMemo, | ||
} from 'react'; | ||
@@ -49,3 +49,3 @@ | ||
// eslint-disable-next-line react-hooks/exhaustive-deps | ||
const api = useCallback(getAPI(instance, params), [instance]); | ||
const api = useMemo(() => getAPI(instance, params), [instance]); | ||
@@ -52,0 +52,0 @@ // eslint-disable-next-line react-hooks/exhaustive-deps |
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
16690