We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb700b9 commit 5c7281eCopy full SHA for 5c7281e
packages/hooks/src/useControllableValue/index.ts
@@ -26,7 +26,9 @@ function useControllableValue<T = any>(
26
props?: Props,
27
options?: Options<T>,
28
): [T, (v: SetStateAction<T>, ...args: any[]) => void];
29
-function useControllableValue<T = any>(props: Props = {}, options: Options<T> = {}) {
+function useControllableValue<T = any>(defaultProps: Props, options: Options<T> = {}) {
30
+ const props = defaultProps ?? {};
31
+
32
const {
33
defaultValue,
34
defaultValuePropName = 'defaultValue',
0 commit comments