Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You still need to use class components for error boundaries.

https://reactjs.org/docs/error-boundaries.html



Yeah, this feels like a weird oversight.


A bit weird, although it’s not clear how they would do it without class components. I guess it would probably look something like React.forwardRef.


They could provide a <ErrorBoundary> component as a built-in that just does what the current one does, but is implemented by the library.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: