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

Warn when calling setState in a constructor #1857

Merged
merged 2 commits into from
Aug 12, 2019
Merged

Conversation

marvinhagemeister
Copy link
Member

This PR adds a warning message in debug when this.setState is called inside the class constructor.

Fixes #1840 .

Copy link
Member

@JoviDeCroock JoviDeCroock left a comment

Choose a reason for hiding this comment

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

LGTM

@marvinhagemeister
Copy link
Member Author

Looks like coveralls is down... Will try again later.

@marvinhagemeister marvinhagemeister merged commit 6f9a9cf into master Aug 12, 2019
@marvinhagemeister marvinhagemeister deleted the setstate-warn branch August 12, 2019 22:22
@coveralls
Copy link

Coverage Status

Coverage remained the same at 99.879% when pulling c1e4537 on setstate-warn into 8c984a2 on master.

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

Successfully merging this pull request may close these issues.

setState() callback not invoked (since 8.3.0)
3 participants