We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0869823 commit 01dd2d7Copy full SHA for 01dd2d7
website/blog/2019-02-06-react-hooks.md
@@ -0,0 +1,16 @@
1
+---
2
+title: React Hooks Are Supported
3
+author: Alex Krolick
4
+authorURL: http://github.com/alexkrolick
5
6
+
7
+[Hooks have been released in React 16.8](https://reactjs.org/blog/2019/02/06/react-v16.8.0.html#testing-hooks)
8
+and they are supported out of the box by `react-testing-library`!
9
10
+Because `react-testing-library` only uses the external interface of your React
11
+components, hooks work right away! If you rewrite a class component with hooks
12
+your tests should still pass.
13
14
+For unit testing custom hooks, we've also added a `testHook` utility. Check out
15
+the [docs for `testHook`](/docs/react-testing-library/api#testhook). Thanks to
16
+[@donavon](https://github.com/donavon) for the PR.
0 commit comments