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

[chore] Fix a number of alerts found on LGTM.com #49

Merged
merged 2 commits into from
Dec 11, 2018

Conversation

s0
Copy link
Contributor

@s0 s0 commented Dec 11, 2018

This isn't a normal feature/bugfix PR, and I'm unsure if this is the sort of contribution you'd like to receive, but thought there's no harm in trying :)

This PR fixes a number of alerts that I found on LGTM.com. The only ones remaining after this are some unused variable alerts.

(Full disclosure: I'm part of the team behind LGTM.com)

s0 added 2 commits December 10, 2018 16:40
Modifying the state object directly is undesirable
(see https://lgtm.com/rules/1823611029/).
React component state updates using setState may
asynchronously update this.props and this.state, thus it is
not safe to use either of the two when calculating the new
state passed to setState, and instead the callback-based
variant should be used instead.
@ascoders
Copy link
Owner

thanks, it's awesome.

@ascoders ascoders merged commit 63621ae into ascoders:master Dec 11, 2018
@s0
Copy link
Contributor Author

s0 commented Dec 11, 2018

Thanks for merging!

@ascoders if you like, you can enable automated code review to automatically catch mistakes like this in the future.

@s0 s0 mentioned this pull request Dec 11, 2018
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.

2 participants