4 ms·
I feel the same way. And how isn't Hooks are worse off in terms of testability? I have got into too far with it, but it seems to favor small piece of ad-hoc co
by tanilama 8y ago
I feel the same way.
And how isn't Hooks are worse off in terms of testability? I have got into too far with it, but it seems to favor small piece of ad-hoc code over classes, which seems neet from the surface, but doesn't feel very encouraging towards tests coverage.
Anyone that applies Hooks to production project can share your experience so far? Would love to see some real world adaptation success stories before making the move.
- boomlinde 8y ago> it seems to favor small piece of ad-hoc code over classes I think that it's important to realize is that classes aren't the only alternative to small pieces of ad-hoc code. Hooks are composable via functions. If you need to reuse your stateful behavior and side effects you can factor them into functions, and if you don't, you'll have exactly the same problems with classes.