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

Change componentDidMount to componentWillMount in shallow options api doc #983

Merged
merged 1 commit into from
Jun 13, 2017

Conversation

calinoracation
Copy link

@calinoracation calinoracation commented Jun 13, 2017

In shallow rendering we do not call componentDidMount, this fixes the docs to reflect that.

Copy link
Member

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, great catch!

@lorenzos
Copy link

lorenzos commented Aug 18, 2017

I'm confused. With disableLifecycleMethods do componentDidMount get called or not?

In the comment here it's said it's not, but the commit itself clearly change the docs by making them say that is componentWillMount to not be called, not mentioning componentDidMount anymore...

@ljharb
Copy link
Member

ljharb commented Aug 18, 2017

DidMount should never be called when using shallow.

@palaniichukdmytro
Copy link

palaniichukdmytro commented Oct 31, 2017

But my case the componentDidMount is called once with shallow, I use react16 and enzyme 3.x,

@ljharb
Copy link
Member

ljharb commented Oct 31, 2017

@palaniichukdmytro please file a new issue

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

Successfully merging this pull request may close these issues.

4 participants