S
SolidJS14mo ago
alloyed

Where does <ErrorBoundary/> catch errors?

The docs example shows an error being caught at component creation which makes sense, but what about * createEffect() calls * onMount()/createRenderEffect() * JSX expressions * event handlers The react answer I think is that it wouldn't catch any of these cases, which seems less useful when the solid signal chains are doing all the computation
1 Reply
thetarnav
thetarnav14mo ago
ErrorBoundary uses context api to communicate so anywhere that ctx can be available will be caught by an error boundary afaik so out of your examples only event handlers won't work unles you use runWithOwner but ErrorBoundary is meant to catch "rendering errors", not subsequent ones for specific user actions, those are on you
Want results from more Discord servers?
Add your server