react-use-controllable-state
Advanced tools
Comparing version 0.0.7 to 0.0.8
import { useControllableState } from './useControllableState'; | ||
export { useControllableState }; | ||
export default useControllableState; |
import { Dispatch, SetStateAction } from 'react'; | ||
export declare function useControllableState<T>(value: T | undefined, changeHandler: Dispatch<SetStateAction<T>> | undefined, initialValue: T | (() => T)): [T, Dispatch<SetStateAction<T>>]; |
{ | ||
"name": "react-use-controllable-state", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "React hook for using controllable state", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -5,2 +5,6 @@ # react-use-controllable-state | ||
Read more: https://medium.com/quick-code/writing-ui-components-with-optionally-controllable-state-86e396a6f1ec | ||
# !!!DEPRECATED!!! | ||
Please use [useControlledState](https://github.com/adobe/react-spectrum/blob/main/packages/%40react-stately/utils/src/useControlledState.ts) from `@react-stately/utils` instead. It's not a drop-in replacement since the signature is a little different. | ||
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
10
20931
10
289