~/talk

Failing Gracefully: Error Boundaries in React

Talkat React Day Bangalore 2021 · 2021-03-19..03-20· [react]
links:none on file
slides:none on file

Error boundaries are React class components using getDerivedStateFromError and componentDidCatch to render a fallback UI and log to services like sentry; they catch errors in rendering, constructors and lifecycle methods but not async code or event handlers and they don’t work on server rendering. Example: a dashboard of many widget components wraps each widget in its own boundary and implements a bubbling counter so when a threshold number of widget errors occurs the parent boundary renders a single fallback. The react reactor boundary library adds a Boundary component, an HOC and a useErrorHandler hook that can invoke the nearest boundary (useful for event handlers and Apollo error objects).

AI-written summary · about

  1. 0:00Introduction to error boundaries
  2. 2:20How error boundaries function
  3. 4:28Advanced bubbling mechanism
  4. 6:00Using helper libraries
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.