Warning: Cannot update a component (TestComponent
) while rendering a different component (TestComponent
).
#1895
-
When writing tests, I encountered the react error Stacktrace
I don't understand what the problem may be. Here is the repository to see |
Beta Was this translation helpful? Give feedback.
Answered by
dbritto-dev
Jun 24, 2023
Replies: 1 comment 3 replies
-
@budarin if you want to test a hook you need to use |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@budarin yes, from react 18 you need to use
renderHook
from@testing-library/react