Skip to content

Instantly share code, notes, and snippets.

View Alpakash's full-sized avatar
😎
HeLLo

Akash Soedamah Alpakash

😎
HeLLo
View GitHub Profile
@andywer
andywer / _readme.md
Last active March 7, 2024 05:52
React - Functional error boundaries

React - Functional error boundaries

Thanks to React hooks you have now happily turned all your classes into functional components.

Wait, all your components? Not quite. There is one thing that can still only be implemented using classes: Error boundaries.

There is just no functional equivalent for componentDidCatch and deriveStateFromError yet.

Proposed solution