▲ | gloosx 7 hours ago | ||||||||||||||||||||||||||||
Well, that is really embarrassing for Cloudflare... A recursion in a side-effect via dependencies is a rookie mistake, it's hard to imagine it could slip into production with a proper due process. Maybe they should stop vibe-coding and deploying things to production without any tests or review? | |||||||||||||||||||||||||||||
▲ | sensanaty 7 hours ago | parent | next [-] | ||||||||||||||||||||||||||||
If after nearly a decade swarms of people are still making the exact same mistakes with how they use a specific method exposed by the library, then the problem isn't with the hundreds/thousands of people making the mistake, the design of the method is broken. This type of issue simply does not exist in Vue or Svelte even if people abuse watchers (which I've anecdotally noticed tends to happen from React devs writing Vue code). Also I just want to point out again that Dan Abramov had to write an insanely long guide to using useEffect [1]. This piece is around 10k words explaining in-depth how useEffect works. That is insane for one of the fundamental, core methods exposed by a library. | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
▲ | WickyNilliams 6 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||
Disagree about it being a rookie mistake. In the simple case, yes. But consider data used by an effect could travel all the way from root to the max depth of your tree with any component along the way modifying it, potentially introducing unstable references. Maybe it worked when you tested. But later someone introduced a new component anywhere between data source and effect which modified the data before passing it on. That component may have used useMemo. So it looks ok, but it over fires. You become reliant on all your ancestors doing the right thing, in every situation, forevermore. One mistake and unstable references cascade everywhere. The surface for introducing errors is huge, esp in a large, complex codebase. And we have no way to guarantee a stable reference. | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
▲ | TomaszZielinski 3 hours ago | parent | prev | next [-] | ||||||||||||||||||||||||||||
As a rookie with gray hair I completely agree :) | |||||||||||||||||||||||||||||
▲ | 5 hours ago | parent | prev [-] | ||||||||||||||||||||||||||||
[deleted] |