import React, { Component } from 'react'; import PropTypes from 'prop-types'; import _ from 'lodash'; import { styles } from './styles'; class Rating extends Component { constructor(props) { super(props); this.clickStar = this.clickStar.bind(this); } shouldComponentUpdate() { // when component re render lost checked item return false; } clickStar(e) { this.props.onRate(e); } renderStars(num) { return (