We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc19bd9 commit dc7bb23Copy full SHA for dc7bb23
hooks/useDefaults.tsx
@@ -12,6 +12,7 @@ type AnyProps = {
12
// will cast the result to ensure type consistency
13
// caution, since this is a new state common state issues will apply.
14
// E.g. access in destructor will not work without a ref (use ref version below instead)
15
+// Caution! If this is used with children this will cause a constant recreation of the children (e.g. textarea cursor jumps to the end)!
16
export function useDefaults<T>(props: AnyProps, defaultValues: DefaultValues) {
17
if (!defaultValues) throw new Error("useDefaults - defaultValues is required")
18
0 commit comments