Handling errors from the HTTP server is good - but catching the error before it goes to the server is better. Form validation can be done in local state or in Redux, so we'll show both methods.
In your own application, you will have to decide how much of your application should be in local state, and how much should be in Redux.
Summary of Content:
- Check for a blank task, and set a validation error in local state
- Use the local state to display an error box on the form
- Think about when to use local state, and when to use Redux
- Convert the local state to Redux