Skip to content

Commit f91faa9

Browse files
author
Kent C. Dodds
committed
docs: add comment to react-hooks example
1 parent 373294d commit f91faa9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

examples/__tests__/react-hooks.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
* This is the recommended way to test reusable custom react hooks.
3+
* It is not however recommended to use the testHook utility to test
4+
* single-use custom hooks. Typically those are better tested by testing
5+
* the component that is using it.
6+
*/
17
import {testHook, cleanup} from 'react-testing-library'
28

39
import useCounter from '../react-hooks'

0 commit comments

Comments
 (0)