pre-installations and preparations
This commit is contained in:
1 parent
3e5a0329cb
commit
201d621ac3
6977 files changed
+742826
No files matched your search
+22
@@ -0,0 +1,22 @@
|
||||
export interface UseControlledProps<T = unknown> {
|
||||
/**
|
||||
* Holds the component value when it's controlled.
|
||||
*/
|
||||
controlled: T | undefined;
|
||||
/**
|
||||
* The default value when uncontrolled.
|
||||
*/
|
||||
default: T | undefined;
|
||||
/**
|
||||
* The component name displayed in warnings.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The name of the state variable displayed in warnings.
|
||||
*/
|
||||
state?: string;
|
||||
}
|
||||
|
||||
export default function useControlled<T = unknown>(
|
||||
props: UseControlledProps<T>,
|
||||
): [T, (newValue: T | ((prevValue: T) => T)) => void];
|
||||
Reference in new issue
Block a user