ninjasort / react-star-rating

[Looking for Maintainers (email me)]: A simple star rating component built with React.
MIT License
173 stars 55 forks source link

React v15 Compatability #33

Closed kennetpostigo closed 8 years ago

kennetpostigo commented 8 years ago

Hello,

I'm currently attempting to integrate react-star-rating into a project I'm working on. I've never used this module before. I'm currently using react v15 and webpack 1.13.0 as my build step. When I drop it into the project I get the following errors in my console:

screen shot 2016-05-10 at 4 39 58 pm screen shot 2016-05-10 at 4 40 10 pm

Here is my code:

import React from 'react';
import {Link} from 'react-router';
import StarRating from 'react-star-rating';

function UserInfo (props) {
  return (
    <div className="UserInfo">
      <div className="panel panel-default">
        <div className="panel-heading">
          <h3 className="panel-title">Kennet Postigo</h3>
        </div>
        <div className="panel-body">
          <ul>
            <li><i className="ion-android-globe"></i> Member Since: September 2015</li>
            <li><i className="ion-podium"></i> Overall Rating: </li> <StarRating name="react-star-rating" totalStars={5} />
          </ul>
        </div>
      </div>
    </div>
  );
}

export default UserInfo;

The component renders but the react-star-rating component doesn't work and all of my other components are broken/frozen. They don't react to user manipulations.

This is how the component renders but is broken/frozen.

screen shot 2016-05-10 at 4 44 48 pm

My concern is whether this is a bug or npm dependency problem. Hope I've provided enough information.

kennetpostigo commented 8 years ago

You may disregard this issue. I switched over to react-star-rating-component and the issue was gone.