Skip to content

Latest commit

 

History

History
executable file
·
16 lines (13 loc) · 681 Bytes

2019-02-06-react-hooks.md

File metadata and controls

executable file
·
16 lines (13 loc) · 681 Bytes
title author authorURL
React Hooks Are Supported
Alex Krolick

Hooks have been released in React 16.8 and they are supported out of the box by react-testing-library!

Because react-testing-library only uses the external interface of your React components, hooks work right away! If you rewrite a class component with hooks your tests should still pass.

For unit testing custom hooks, we've also added a testHook utility. Check out the docs for testHook. Thanks to @donavon for the PR.