← React Intermediate Questions - Set 6 Q52

How do you handle error boundaries in React?

React Intermediate Questions - Set 6

Example

static getDerivedStateFromError(e) { return { e }; }
componentDidCatch(e, info) { log(e, info.componentStack); }

What to notice

← Back to the question list