Created
October 1, 2018 18:16
-
-
Save StevenJL/d909a2952483ab81f91410a0d3027ad3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class User extends React.PureComponent { | |
// ... | |
updateUserStatus(status) { | |
const { user } = this.state | |
this.state.user.status = status | |
} | |
appendItem(newItem) { | |
const { items } = this.state | |
this.state.items.push(newItem) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment