React Error Boundaries: Handling Rendering Errors Gracefully

Your React app showed a blank white screen — here is how to prevent it. Walk through rendering vs. runtime errors, class-based Error Boundary implementation, and the react-error-boundary library with practical code examples.

February 25, 2026 · 11 min · 2211 words · CodeGenos

Typescript: Extend Array type with sum count avg min max Aggregates

In this article i’ll show you how to implement sum, count, avg, min and max aggregate functions that applies to all Array instances in typescript. First we will learn how to extend Array type: Extend Array prototype In javascript, you can extend an existing class by adding a new function to its prototype without modifying its source code. To add new function to Array type, you basically set the new function to Array.prototype.<functionName> and you can use the new function for all the instances of the class you create. ...

September 3, 2023 · 4 min · 770 words · CodeGenos