7 ms·
Practically every frontend framework uses components. The problem with React is that so many of its abstractions are leaky and forces a lot of accidental comple
by erokar 2y ago
Practically every frontend framework uses components. The problem with React is that so many of its abstractions are leaky and forces a lot of accidental complexity on the developer.
- dansiemens 2y agoWhich abstractions are leaky? State is complex. There’s not really a way to get around that.
- yawaramin 2y agoDependency arrays are leaky.
- math_dandy 2y agoHow do they leak? Are they even an abstraction?
- dalmo3 2y agoOne 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.
- yawaramin 2y agoWell, 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.