All jobs / Full-stack developer / Frontend

Full-stack developer interview question · 3–5 years

A teammate throws inside `fetch` so the React error boundary can show the outage.

What is the difference?

The strongest answer

An error boundary catches render throws; a failed fetch is data you must handle in the request path — do not throw in the fetch to 'reuse' the boundary for an API 500

Why it works

Exactly. Boundaries are for unexpected render failures. A 500 is an expected state of a request. Mixing them turns every outage into a white screen.

What a good answer covers

Answers that fall short

Who gets asked this

More Frontend questions