3 ms·
>Classes map to certain use cases very well; for instance, there's no Hook for "componentDidCatch" or any other error handling. >That being said, you are not l
by Klonoar 7y ago
>Classes map to certain use cases very well; for instance, there's no Hook for "componentDidCatch" or any other error handling.
>That being said, you are not losing anything. The tools are simply different (although the old tools are still there, too!).
Well... no, you clearly are losing something. You might not use it frequently but it's a pain in the ass when you do need it.
- lilactown 7y agoClasses are not verboten :) I typically create an error boundary that wraps my app/feature/etc. with a fallback component and call it a day.