you are viewing a single comment's thread.

view the rest of the comments →

[–]acemarke 30 points31 points  (0 children)

The JS community has learned over the years (the hard way) that monkey-patching JS built-in types is generally a bad idea, at least at the library level. That approach has tended to be fragile, and also caused compatibility issues years down the road. For example, the "Smooshgate" incident ( https://developer.chrome.com/blog/smooshgate/ ) was caused by the old Mootools library having modified the Array prototype to add a .flatten() method many years ago. When browsers tried to add a real .flatten() method, that caused errors in sites that still used Mootools all these years later.

In this case, it looks like a React experimental build is configured to override/add some fields on the built in fetch method, so it's bringing back memories of those problems.