3 ms·
your preference for model/view/purely presentational components would benefit from using hooks in your model layer as opposed to a class component with the old
by nfRfqX5n 5y ago
your preference for model/view/purely presentational components would benefit from using hooks in your model layer as opposed to a class component with the old lifecycle hooks. hooks are the model
- azangru 5y ago> hooks are the model Unless you mock a hook at the module import level (which is hacky), you lose the easy testability of your component. That's long been bothering me about hooks, although I use them plenty.