-
I am trying to make a form that updates a form component when an error needs to be displayed. It currently updates the Fields array using the Thank you again for your help :) form.store.ts
textinput.component.tsx
Form.tsx
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Solved! The solution is to only select ONE attribute at a time (not value and error). In fact, selecting value isn't even necessary for most/all inputs.
I would still appreciate any input if anyone has suggestions on how to improve the code. |
Beta Was this translation helpful? Give feedback.
Solved!
The solution is to only select ONE attribute at a time (not value and error). In fact, selecting value isn't even necessary for most/all inputs.
const error = useStore(useCallback(state => state.fields[props.id].error, [props.id]), shallow)
I would still appreciate any input if anyone has suggestions on how to improve the code.