Komponen yang disukai Bereaksi

import React from "react";

const Like = (props) => {
  let classes = "fa fa-heart";
  if (!this.props.liked) classes += "-o";
  return (
    <i
      onClick={this.props.onClick}
      like={this.props.liked}
      className={classes}
      style={{ cursor: "pointer" }}
    ></i>
  );
};

export default Like;
Bewildered Badger