-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
The state is not reflect in the view when using useEffect and setTimeout #2519
Comments
Enzyme effectively takes a snapshot of your UI after the initial From experience working with developers on my team this aspect of Enzyme can be pretty confusing if you've not developed a good mental model of how it works. It would definitely improve the user experience if the need for this could be eliminated. |
@robertknight fwiw v2 did this automatically; unfortunately (as i've come to believe in time) v3 changed this behavior to require an explicit |
I have same issue here but in my case, I dont use any |
Current behavior
SomeComponent.tsx
:SomeComponent.test.tsx
:If I don't call
wrapper.update()
method, the changed state will not reflect in the view.test result
Expected behavior
I don't know why I should call
wrapper.update()
here. As you can see, the state is changed, but the value of thevisible
prop is not changed.API
Version
Adapter
The text was updated successfully, but these errors were encountered: