handleChange can't target state keys with delimiters ex: traits.email
Does not work on browser and react native
Current Behavior
having an initial value {["traits.email"]: "", ["traits.password"]: ""} doesn't update on value change when using props.handleChange("traits.email")
However when I directly update the react state it does work as expected
Expected behavior
The value should update when using onChangeText={props.handleChange("traits.email")} in react native and onChange{props.handleChange} in browser (made sure name is set)
Currently, I am updating the internal react state directly which works as expected. I couldn't target the location where the state gets updated in Formik lib (skimmed through it TBH)
Bug report
handleChange
can't target state keys with delimiters ex:traits.email
Does not work on browser and react nativeCurrent Behavior
having an initial value
{["traits.email"]: "", ["traits.password"]: ""}
doesn't update on value change when usingprops.handleChange("traits.email")
However when I directly update the react state it does work as expected
Expected behavior
The value should update when using
onChangeText={props.handleChange("traits.email")}
in react native andonChange{props.handleChange}
in browser (made surename
is set)Reproducible example
The following example clearly shows what happens Reproducible example
Suggested solution(s)
Currently, I am updating the internal react state directly which works as expected. I couldn't target the location where the state gets updated in Formik lib (skimmed through it TBH)
Additional context
These IDs approach are used by kratos
Your environment