-
-
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
Calling setProps() doesn't change props of children anymore #1221
Comments
Same issue for me. Seems similar to #1229 |
setProps looks like is not calling componentWillReceiveProps, so probably that is why the props of the children are not updating |
same here, btw HACK!
new code start working...
|
It is an intended change in v3 to require you to re-find elements if you want changes reflected. |
@ljharb, but why if we have .props() method? that method should return actual props, this will cause duplications in a code... btw there is no information in migrating notes about this... |
@Kepro when you use |
@ljharb, then why setProps is not calling of componentWillReceiveProps of root wrapper? Or should is a different issue? |
@Fetz that might be a different issue; please file one and include your enzyme and react (and if applicable, enzyme adapter) versions |
Hi, |
Same situation here :/ |
can you read comments before you add your comment? |
|
Working using the solution i find in this comment But need to use setTimeout every time when made changes is bad.
|
@victorAttar you're commenting on a closed issue from 2017! for help use StackOverflow... |
Ended up finding the solution for my problem. I'm using redux and enzyme, wrapped my componentes to a But i found that enzyme has a wrapper prop, then changed my function from
to
Now |
I just switched to Enzyme v3 with React v15.6 and I could notice that
setProps()
doesn't change props of children anymore. Instead, it only changes props of wrapper:Config
Test
The above test works with Enzyme v2.
The text was updated successfully, but these errors were encountered: