testing-library-docs icon indicating copy to clipboard operation
testing-library-docs copied to clipboard

docs: add a note on when not to use renderHook

Open zaicevas opened this issue 3 years ago • 0 comments

In https://github.com/testing-library/react-hooks-testing-library/blob/main/README.md there are two reasons when not to use react-hooks-testing-library:

  1. Your hook is defined alongside a component and is only used there 2. Your hook is easy to test by just testing the components using it

I think it still holds true and it would make sense to add this into renderHook docs. I've omitted the first point because it seems like the second point covers it. We could add both, though.

zaicevas avatar Jun 22 '22 20:06 zaicevas