State Management · Senior · Question 45 of 75

How should validation errors from a React Router action reach the form?

Explanation

Expected errors (an invalid email) are data: return { errors } (often with a 400 status). Thrown errors go to the ErrorBoundary and replace the route UI - that's for unexpected failures.

Further reading

Problem with a question

State Management · Senior · question 45

Test yourself

Take the State Management · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz