|
|
|
|
|
by mplanchard
2118 days ago
|
|
I agree with your take, and what bothers me about hooks is that they aren’t even “functional”. They’re making what otherwise look like pure functions into stateful functions, whose return values can change on subsequent calls. This could have been largely averted by passing a hook manager into component functions, an idea that was brought up in the hooks RFC but rejected. I prefer the class-based approach for stateful components because at least then it’s clear that the component has some state it is managing and how. |
|