News for hackers. Stuff that matters.
Re:React 19 by math_dandy on Thursday December 05, 2024 @08:34PM (#42335109)
How do they leak? Are they even an abstraction?
Re:React 19 by dalmo3 on Thursday December 05, 2024 @10:38PM (#42336074)
One example where it's leaky is when you want to memoize something, and now you need to memoize all its dependencies, recursively, and you end up with a 30 file PR.

I say this as a big fan of React, and I'm hoping the compiler turns out a success.

Re:React 19 by yawaramin on Friday December 06, 2024 @01:40AM (#42337035)
Well, they're part of the effects abstraction. And they are leaking because you have to manually track them. You are already using the dependency variables inside the hook function. And now you need to duplicate them into an array and keep the array updated as your effect hook changes. This is leaky.