testing-library-docs
testing-library-docs copied to clipboard
docs: add a note on when not to use renderHook
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:
- 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.