4 ms·
I know I may be in the minority here, but I can't say that I'm a fan of this feature. I can't envision a scenario where this would be my preferred solution to a
by pg_bot 8y ago
I know I may be in the minority here, but I can't say that I'm a fan of this feature. I can't envision a scenario where this would be my preferred solution to any of the problems that they detail. Templates should remain stateless, as they are far easier to reason about that way. My gut reaction is that this is a giant step backward.
- koboll 8y agoWhy would this result in templates becoming more stateful? This is simply an alternative, more flexible way to build stateful components.
- ergothus 8y agoAre you referring to hooks in general, or the specific useState hook they showed? I love the idea of hooks - the more I can isolate my logic, the better. The useState example I'm pretty ambivalent about, for the exact reason you state.
- boubiyeah 8y agoreact is not based on logicless templates. Their very first presentation in 2012 or 2013 made that clear. It's a feature.