@leafygreen-ui/hooks
Advanced tools
Comparing version 1.1.0 to 2.0.0
# @leafygreen-ui/hooks | ||
## 2.0.0 | ||
### Major Changes | ||
- 464c09d: Introduces SSR compatibility though a change to our build process and files | ||
## 1.1.0 | ||
@@ -4,0 +10,0 @@ |
@@ -6,3 +6,3 @@ /** | ||
const Example = () => { | ||
[ refNode, setRefNode ] = useElementNode | ||
[ refNode, setRefNode ] = useElementNode() | ||
return ( | ||
@@ -9,0 +9,0 @@ <div ref={setRefNode}>I am a ref</div> |
{ | ||
"name": "@leafygreen-ui/hooks", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "LeafyGreen UI Kit Custom Hooks", | ||
"main": "./dist/index.js", | ||
"browser": "./dist/index.web.js", | ||
"main": "./dist/index.node.js", | ||
"types": "./dist/index.d.ts", | ||
@@ -15,2 +16,2 @@ "scripts": { | ||
"gitHead": "dd71a2d404218ccec2e657df9c0263dc1c15b9e0" | ||
} | ||
} |
@@ -8,3 +8,3 @@ import { useState, useCallback } from 'react'; | ||
const Example = () => { | ||
[ refNode, setRefNode ] = useElementNode | ||
[ refNode, setRefNode ] = useElementNode() | ||
return ( | ||
@@ -11,0 +11,0 @@ <div ref={setRefNode}>I am a ref</div> |
@@ -32,5 +32,5 @@ import { useEffect, useRef } from 'react'; | ||
) { | ||
const memoizedEventCallback: React.MutableRefObject< | ||
(e: GlobalEventHandlersEventMap[Type]) => void | ||
> = useRef(() => {}); | ||
const memoizedEventCallback: React.MutableRefObject<( | ||
e: GlobalEventHandlersEventMap[Type], | ||
) => void> = useRef(() => {}); | ||
@@ -37,0 +37,0 @@ useEffect(() => { |
@@ -19,3 +19,3 @@ import { useEffect, useState } from 'react'; | ||
callback: MutationHandler<Value>, | ||
enabled: boolean = true, | ||
enabled = true, | ||
): Value | undefined { | ||
@@ -22,0 +22,0 @@ const [value, setValue] = useState<Value>(); |
Sorry, the diff of this file is not supported yet
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
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
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
289324
22
397
0
88
3