score:1

Accepted answer
const toggleLike = () => {
  setState(prevState => { ...prevState, liked: !prevState.liked })
}

score:0

onClick={() => submitComment(props.post, state.comment, state.comment)}

Related Query

More Query from same tag