react-hotkeys-hook
Advanced tools
Comparing version 4.0.4-0 to 4.0.4-1
{ | ||
"name": "react-hotkeys-hook", | ||
"version": "4.0.4-0", | ||
"version": "4.0.4-1", | ||
"repository": "https://JohannesKlauss@github.com/JohannesKlauss/react-keymap-hook.git", | ||
"homepage": "https://johannesklauss.github.io/react-hotkeys-hook/", | ||
"author": "Johannes Klauss", | ||
"main": "dist/index.js", | ||
"main": "dist/index.cjs", | ||
"module": "dist/index.mjs", | ||
"types": "dist/index.d.ts", | ||
@@ -9,0 +10,0 @@ "files": [ |
import { HotkeyCallback, Keys, OptionsOrDependencyArray, RefType } from './types' | ||
import { useCallback, useLayoutEffect, useRef } from 'react' | ||
import { useCallback, useEffect, useLayoutEffect, useRef } from 'react' | ||
import { parseHotkey, parseKeysHookInput } from './parseHotkeys' | ||
@@ -22,2 +22,4 @@ import { | ||
const useSafeLayoutEffect = typeof window !== 'undefined' ? useLayoutEffect : useEffect | ||
export default function useHotkeys<T extends HTMLElement>( | ||
@@ -41,3 +43,3 @@ keys: Keys, | ||
useLayoutEffect(() => { | ||
useSafeLayoutEffect(() => { | ||
if (memoisedOptions?.enabled === false || !isScopeActive(enabledScopes, memoisedOptions?.scopes)) { | ||
@@ -44,0 +46,0 @@ return |
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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
26
0
96996
507