I think this is a stupid question because it seems like a very basic use case but I can't find any docs or mentions of how to do it.
Inside my field context, how do I get the
defaultValue
defaultValue
given to that field in the original
useForm
useForm
hook call?
const field = useFieldContext<string>();// We have access to the meta that tells us if the current value is the defaultValue but not *what* that value is const isDefault = field.state.meta.isDefaultValue
const field = useFieldContext<string>();// We have access to the meta that tells us if the current value is the defaultValue but not *what* that value is const isDefault = field.state.meta.isDefaultValue