Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated react hooks example page to match react-hooks-testing-library's documentation #64

Open
wants to merge 5 commits into
base: hooks
Choose a base branch
from

Conversation

ab18556
Copy link

@ab18556 ab18556 commented Mar 22, 2019

I updated the current pull request to match react-hooks-testing-library's doc. I removed the blog page since it is not true anymore and I also removed testHook from the api since it is not a part of it anymore.

@alexkrolick alexkrolick added the 🚧 work in progress Not ready, being worked on label Mar 30, 2019
@mpeyper
Copy link
Member

mpeyper commented Apr 26, 2019

@alexkrolick, I think you can close this now. react-hooks-testing-library recently merged a change to stop using react-testing-library for rendering, so I'm not sure it's still appropriate for it to appear in these docs.

We still follow the same principals, but the say we're part of the testing-library ecosystem is not technically true anymore.

@alexkrolick
Copy link
Collaborator

I don't think not having a hard dependency on RTL is a requirement; I would say it belongs in the same "Ecosystem" category as jest-dom and native-testing-library -- libs that share the overall approach and complementary features.

https://testing-library.com/blog/2019/04/25/new-org

@kentcdodds
Copy link
Member

Agreed Alex.

@mpeyper
Copy link
Member

mpeyper commented Apr 27, 2019

Ok cool. I'm happy for this to continue then :)

@bcarroll22
Copy link
Contributor

I also let @mpeyper know that the change to no longer require react-testing-library was actually a huge help to native because now we can leverage his library as well for writing hooks tests 🎉

@kentcdodds
Copy link
Member

Oh nice!

@alexkrolick
Copy link
Collaborator

I'm not sure about the current state of this library - is this PR accurate or do we need a reboot?

@mpeyper
Copy link
Member

mpeyper commented Oct 1, 2020

The library is still active, and the examples shown here are still accurate (our API hasn't changed much), but some of the descriptions and links are not quite right anymore. We aren't using react-testing-library any more and the links point to the the old location before it was brought into the testing-library org.

@alexkrolick alexkrolick added hacktoberfest 🎃 help wanted 👋 Extra attention is needed and removed 🚧 work in progress Not ready, being worked on labels Oct 1, 2020
`react-testing-library` provides the
[`testHook`](/docs/react-testing-library/api#testhook) utility to test custom
hooks.
[`react-hooks-testing-library`](https://github.com/mpeyper/react-hooks-testing-library) is built on top of [`react-testing-library`](/react) to create a simple test harness for [React hooks](https://reactjs.org/docs/hooks-intro.html) that handles running them within the body of a function component, as well as providing various useful utility functions for updating the inputs and retrieving the outputs of your [custom hook](https://reactjs.org/docs/hooks-custom.html).
Copy link
Contributor

@rawat07102 rawat07102 Oct 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should replace this description with react-hooks-testing-library "The solution" section with an updated link for react-hooks-testing-library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted 👋 Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants