Open doomsower opened 5 years ago
It would be nice! I really miss this.
For example, I'm building a multi step form that is controlled by status, that could be 1 | 2 | 3 or by name which would be better for not trying to remember which step a number represent ("LOCATION" | "PAYMENT" | "MORE INFO" for example).
This typing would be really convenient for that use.
🚀 Feature request
Current Behavior
Form status has type
any
Desired Behavior
I'd like to have strongly typed status.
Suggested Solution
Just add second generic argument to Formik, and then add it everywhere down the chain. It can default to
any
, so that existing code doesn't break. So it would look like(I removed
ExtraProps
here, because they are not used at all, if I'm not mistaken)If you're ok with this idea, I can submit PR.
Who does this impact? Who is this for?
Those who use Typescript and form status at the same time.
Describe alternatives you've considered
Additional context