@shopify/react-hooks
Advanced tools
Comparing version 3.0.5 to 3.1.0
@@ -5,3 +5,3 @@ /** | ||
*/ | ||
export declare function useToggle(initialState: boolean): { | ||
export declare function useToggle(initialState: boolean | (() => boolean)): { | ||
value: boolean; | ||
@@ -8,0 +8,0 @@ toggle: () => void; |
{ | ||
"name": "@shopify/react-hooks", | ||
"version": "3.0.5", | ||
"version": "3.1.0", | ||
"license": "MIT", | ||
@@ -48,5 +48,5 @@ "description": "A collection of primitive React hooks", | ||
"devDependencies": { | ||
"@shopify/jest-dom-mocks": "^4.2.0", | ||
"@shopify/react-testing": "^5.1.3" | ||
"@shopify/jest-dom-mocks": "^5.0.0", | ||
"@shopify/react-testing": "^5.1.4" | ||
} | ||
} |
@@ -245,3 +245,3 @@ # `@shopify/react-hooks` | ||
This hook provides an object that contains a boolean state value and a set of memoised callbacks to toggle it, force it to true, and force it to false. It accepts one argument that is the initial value of the state. This is useful for toggling the active state of modals and popovers. | ||
This hook provides an object that contains a boolean state value and a set of memoised callbacks to toggle it, force it to true, and force it to false. It accepts one argument that is the initial value of the state or an initializer function returning the initial value. This is useful for toggling the active state of modals and popovers. | ||
@@ -248,0 +248,0 @@ ```tsx |
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
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
37243