News for hackers. Stuff that matters.
Re:React I love you, but you're bringing me down by tshaddox on Tuesday September 20, 2022 @12:10PM (#32913763)
You still need to use class components for error boundaries.

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

Re:React I love you, but you're bringing me down by ajkjk on Tuesday September 20, 2022 @12:56PM (#32914535)
Yeah, this feels like a weird oversight.
Re:React I love you, but you're bringing me down by tshaddox on Tuesday September 20, 2022 @03:54PM (#32916924)
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.
Re:React I love you, but you're bringing me down by ajkjk on Tuesday September 20, 2022 @05:57PM (#32918339)
They could provide a <ErrorBoundary> component as a built-in that just does what the current one does, but is implemented by the library.