🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

hookbase

Package Overview
Dependencies
Maintainers
1
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hookbase - npm Package Compare versions

Comparing version
0.1.2
to
0.1.3
+13
templates/use-toggle.ts
import * as React from "react";
export function useToggle(
defaultValue?: boolean
): [boolean, () => void, React.Dispatch<React.SetStateAction<boolean>>] {
const [value, setValue] = React.useState(!!defaultValue);
const toggle = React.useCallback(() => {
setValue((x) => !x);
}, []);
return [value, toggle, setValue];
}
+1
-1
{
"name": "hookbase",
"version": "0.1.2",
"version": "0.1.3",
"type": "module",

@@ -5,0 +5,0 @@ "bin": {