React · Senior · Question 75 of 75

Why are error boundaries still written as classes (or provided by a library)?

Explanation

Most teams write one reusable boundary (or use react-error-boundary) and place it around routes and independent widgets.

Further reading

Problem with a question

React · Senior · question 75

Test yourself

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

Take this quiz