Skip to content
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

Shallow renderer never call componentDidUpdate in v16. #1058

Closed
koba04 opened this issue Aug 4, 2017 · 6 comments
Closed

Shallow renderer never call componentDidUpdate in v16. #1058

koba04 opened this issue Aug 4, 2017 · 6 comments

Comments

@koba04
Copy link
Contributor

koba04 commented Aug 4, 2017

Shallow render no longer call componentDidUpdate from 16.0.0-beta.3.

facebook/react#10372

Currently, enzyme's shallow calls cDU manually when calling setProps with lifecycleExperimental flag.
By this change, we need to call cDU manually even if setState is called with lifecycleExperimental flag.

But enzyme has a plan that lifecycleExperimental is default in v3.
In the case, we need to always call cDU except disableLifecycleMethods is true.

I can work on this, but it will be based on this PR.

@ljharb
Copy link
Member

ljharb commented Aug 4, 2017

We do not support alphas or betas of React. When we do support it, we'll have to adapt to this behavior, but it'll be adapter-specific. See #1007.

@ljharb ljharb closed this as completed Aug 4, 2017
@koba04
Copy link
Contributor Author

koba04 commented Aug 5, 2017

Yeah, I don't mean enzyme should support React alphas or betas, which is just to report what enzyme should resolve until v3.

BTW, Does enzyme have a plan to support React RCs?

@youknowriad
Copy link

I've just encountered this with the released version, should this be reopened?

@ljharb
Copy link
Member

ljharb commented Sep 27, 2017

It's been addressed with #1133 and #1139.

@youknowriad
Copy link

youknowriad commented Sep 27, 2017

🤔 It's still not working for me, not sure why, I'll try to isolate the use-case.

@ljharb
Copy link
Member

ljharb commented Sep 27, 2017

In React 16, the shallow renderer is not supposed to call cDU. That's what those PRs address.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants