@@ -34,6 +34,12 @@ export default function useForm(configs = []) {
3434 (name, value) => _setValues(values => ({ ...values, [name]: value })),
3535 [_setValues]
3636 );
37+ // ^ NB(shrugs): because we're not syncing the initialValue of _additional_
38+ // configs that are added, we won't be able to set an initialValue for a
39+ // dynamic form that then triggers validation. for initial configs,
40+ // initialValue can be a validated string and everything will be happy,
41+ // but for dynamically added input configs, we won't get validation, etc
42+ // until there's a traditional state update.
3743
3844 // track focused states
3945 const [focused, _setFocused] = useState(() =>
@@ -139,7 +145,7 @@ export default function useForm(configs = []) {
139145 autoFocus: config.autoFocus && !config.disabled,
140146 // dom properties below:
141147 bind: {
142− value: values[config.name],
148+ value: values[config.name] || config.initialValue,
143149 onChange: onChange(config.name),
144150 onFocus: onFocus(config.name),
145151 onBlur: onBlur(config.name),