-
Notifications
You must be signed in to change notification settings - Fork 690
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
renderHook unable to rerender props on the wrapper #1372
Comments
It's not possible just like it's not possible to call The naming of
It might even be better to not use |
Describe the bug
Sorry I don't know if I should list this as a bug or as a feature request with the renderHook now being supported react hook testing library. It used to possible to test how context and hooks worked together with react-hooks-testing library - you could render a wrapper with and initial props and then pass new props to the wrapper using rerender.
Here is the example on react hooks testing library site
This was really useful as it allowed you to test how updates from your providers via context could effect the output from your hooks.
To Reproduce Steps to reproduce the behaviour:
This is the implementation as it was on react hooks testing library - I do understand how that how the initial props for the wrapper as changed but I'm using this more to draw attention to how rerender used to work.
Expected behaviour
There should be some way to rerender the wrapper for the hook you are testing with different prop values or maybe a documented example of how to test context and hooks in this way if it already exists. Is this possible with the current implementation?
The text was updated successfully, but these errors were encountered: