I saw the todo: and knew how to solve it. It's a bit of a doozy though.
The end result is that you can have stricter typing for the form fields. It could be simplified if we only want TextField to ever work with ObservationFormData.
The end result is:
You can't use a name prop for a form field that is not a string:
I saw the
todo:
and knew how to solve it. It's a bit of a doozy though.The end result is that you can have stricter typing for the form fields. It could be simplified if we only want
TextField
to ever work withObservationFormData
.The end result is:
name
prop for a form field that is not a string: