React hook causes downtime at Cloudflare, which just stopped the biggest DDoS(blog.cloudflare.com)
blog.cloudflare.com
React hook causes downtime at Cloudflare, which just stopped the biggest DDoS
https://blog.cloudflare.com/deep-dive-into-cloudflares-sept-12-dashboard-and-api-outage/
7 コメント
I agree that runtime support will definitely help. However, a simple mitigation strategy is to override the `fetch` function and provide a central rate-limiting. This helps prevent such incidents even if this kind of bugs are shipped to production.
These types of issues have to be the largest footguns in the react architecture. Relying so heavily on the linter to avoid the initial dependency mismatch issues and then on memoising to avoid the re-triggering can really feel like dancing on eggshells.
[deleted]
Time for ”React considered harmful”
Tomorrow's headline: react use effect hook leads to new, largest npm supply chain attack.
"Ooh, self-DDoS! Those are rare!"
It gets even worse when you start to pass values down several layers of components when the average advice on the web is "don't overuse useMemo". For those unfamiliar it is a way to memoize a value so you get a stable reference that is only mutated if the underlying data mutates, it basically avoids this specific issue.
React wants you to code in functional immutable style, but the language doesn't provide proper immutable data structures.