Skip to content

use-form suggestion: handleChange hook #61

Answered by rtivital
cstrat asked this question in Q&A
Discussion options

You must be logged in to vote

I've tried to implement something like this and it did not work out:

  • some inputs do not support event (NumberInput, RadioGroup, upcoming SegmentedControl) – it won't work for them and experience will be inconsistent
  • TypeScript – this will bypass all type checks – there is no way to validate that event name or id is presented in use-form state, thus although form type can be maintained it will result in possibilities of types mismatches (e.g. incorrect field name, string instead of boolean in values) making form type obsolete.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@cstrat
Comment options

Answer selected by cstrat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants