Skip to content

Commit 1d7323f

Browse files
Kent C. DoddsKent C. Dodds
Kent C. Dodds
authored and
Kent C. Dodds
committed
docs: add comment to react-hooks example
1 parent 8e08ccf commit 1d7323f

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)