You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you are re-rendering, either through state change or calling rerender() the value returned by the hook may be different, but your test isn't going to re-run. You make assertions on the last value you got though by checking result.current
Is there a reason why
result
is a Ref (or ref-like)?What is the advantage of getting the result off
result.current
instead of the direct result?It would be a very simple change
https://github.com/mpeyper/react-hooks-testing-library/blob/master/src/index.js#L24
So, I feel like I must be missing something obvious.
The text was updated successfully, but these errors were encountered: