Why Patching Globals Is Harmful
Briefly

Most of us don't do monkey-patching, and even fewer stay around those implementations long enough to witness their impact.
Throughout the next few thousands of words, I will be referring to modifications of global APIs as 'patching'. You take the code you don't own, you modify its behavior, you patch it.
I am using React, Next.js, and Bun as examples in this article because they have introduced features built on top of patched globals in the past months, which was met with a sizeable backlash from the community.
Today, you will learn why patching globals is never such a choice, despite its reasoning and appeal, which we will also discuss.
Read at kettanaito.com
[
add
]
[
|
|
]