What is Error Boundary and why is it needed?
Answer
•Catches errors during rendering/lifecycle.
•Doesn't catch errors in async/handlers.
•Shows fallback UI.
•Implemented via class component or library.
•Add logging (Sentry) in componentDidCatch.
Was this answer helpful?