Re:Use Hooks – A Collection of Reusable React Hooks
by uhoh-itsmaciek on Friday December 14, 2018 @03:36AM
(#18679378)
Do you have thoughts regarding testing components that use hooks? I have not seen that addressed and not sure what the right approach should be. For hooks like state I imagine it just works, but if your hooks have more elaborate side effects... Do you mock the hooks? Their dependencies? Have hooks use context to do DI and take advantage of that in tests?
[ Parent
| on HN ]
There are no comments on this comment yet.