class LikeButton extends Component {
constructor () {
super()
this.state = { isLiked: false }
}
handleClickOnLikeButton () {
this.setState({
isLiked: !this.state.isLiked
})
}
render () {
const wordings = this.props.wordings || {
likedText: '取消',
unlikedText: '点赞'
}
return (
)
}
}