Error boundaries catch JavaScript errors in component trees and display fallback UI instead of crashing your whole app. Creating an Error Boundary Usage Limitations Only class components can be error boundaries Don’t catch errors in event handlers (use try/catch) Don’t catch errors in async code Don’t catch errors in SSR
Read more →