Skip to content

Commit

Permalink
Use updater function argument in new-account.component
Browse files Browse the repository at this point in the history
  • Loading branch information
danjm committed Feb 27, 2019
1 parent dda4fde commit 5771a6f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ export default class NewAccount extends PureComponent {
}

toggleTermsCheck = () => {
this.setState({
termsChecked: !this.state.termsChecked,
})
this.setState((prevState) => ({
termsChecked: !prevState.termsChecked,
}))
}

render () {
Expand Down

0 comments on commit 5771a6f

Please sign in to comment.