4 ms·
Is there a hook for an error boundary component yet or is a class component still the easiest way?
by interstice 4y ago
Is there a hook for an error boundary component yet or is a class component still the easiest way?
- sophiebits 4y agoNot yet! Other improvements have been higher priority so far. Many people also use the react-error-boundary npm package, and some frameworks have their own error boundary APIs (eg: https://beta.nextjs.org/docs/routing/error-handling https://beta.nextjs.org/docs/routing/error-handling).
- klysm 4y agoI encourage people to copy what they need out of react-error-boundary and tightly integrate it with their stack. It’s really not bad