Created
November 23, 2019 20:07
-
-
Save tjinauyeung/b8739f87200e6533e16ee23719ede4df to your computer and use it in GitHub Desktop.
This file contains 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
this.state = { | |
quotesLiked: [], | |
quotesDisliked: [] | |
}; | |
setLiked = (id) => { | |
this.setState({quotesLiked: [ | |
...this.state.quotesLiked, | |
id | |
]); | |
} | |
setDisLiked = (id) => { | |
this.setState({quotesDisLiked: [ | |
...this.state.quotesDisLiked, | |
id | |
]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment