@highlight-ui/utils-hooks
Advanced tools
Comparing version 3.0.5 to 3.0.6
@@ -1646,9 +1646,7 @@ 'use strict'; | ||
function useForkRef(refs) { | ||
return React.useMemo(function () { | ||
return function (refValue) { | ||
refs.forEach(function (ref) { | ||
return setRef(ref, refValue); | ||
}); | ||
}; | ||
}, [refs]); | ||
return React.useCallback(function (refValue) { | ||
refs.forEach(function (ref) { | ||
return setRef(ref, refValue); | ||
}); | ||
}, refs); | ||
} | ||
@@ -1655,0 +1653,0 @@ |
import * as React from 'react'; | ||
import { cloneElement, useRef, useState, isValidElement, createRef, PureComponent, useEffect, useLayoutEffect, useMemo } from 'react'; | ||
import { cloneElement, useRef, useState, isValidElement, createRef, PureComponent, useEffect, useLayoutEffect, useCallback } from 'react'; | ||
import { createPopper as createPopper$1, popperGenerator, preventOverflow, popperOffsets, eventListeners, computeStyles, applyStyles, offset, flip } from '@popperjs/core'; | ||
@@ -1605,9 +1605,7 @@ import { findDOMNode } from 'react-dom'; | ||
function useForkRef(refs) { | ||
return useMemo(function () { | ||
return function (refValue) { | ||
refs.forEach(function (ref) { | ||
return setRef(ref, refValue); | ||
}); | ||
}; | ||
}, [refs]); | ||
return useCallback(function (refValue) { | ||
refs.forEach(function (ref) { | ||
return setRef(ref, refValue); | ||
}); | ||
}, refs); | ||
} | ||
@@ -1614,0 +1612,0 @@ |
{ | ||
"name": "@highlight-ui/utils-hooks", | ||
"version": "3.0.5", | ||
"version": "3.0.6", | ||
"author": "Personio GmbH & Co. KG", | ||
@@ -48,3 +48,3 @@ "main": "dist/cjs/index.js", | ||
}, | ||
"gitHead": "fb3f9a6b21a3641d3c4d17a5eb1d8553eea74243" | ||
"gitHead": "bb0d0bbb4416fe54c1319eaf28c646611077cdcb" | ||
} |
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
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
323999
2914
5