December 2019
Intermediate to advanced
598 pages
12h 21m
English
We are going to track the validation error messages in the state as the user completes the form and fields become valid or invalid. Later on, we'll be able to render the error messages to the screen. We are going to store the validation errors in the Form component state as follows:
export interface Errors { [key: string]: string[];}
This is an indexable type where an array of validation error messages is associated with a field name.
Read now
Unlock full access