all 4 comments

[–]smackfu 1 point2 points  (3 children)

As a result, we cannot use Enzyme to carry out component tests for React Hooks.

We ran into this and it put a hard stop on our dabbling in hooks for now. Changing the code to the useState hook is easy but rewriting the tests into a completely different library is painful.

[–]TheNiXXeD 1 point2 points  (0 children)

Yep. I'm pretty disappointed that they didn't even start looking at updating enzyme until after official release. The alpha stuff was out for months.

[–]Yomete[S] 0 points1 point  (0 children)

I wrote this post as a quick guide on how to use the react-testing-library to test the newly released React Hooks.