react-star-rating
react-star-rating copied to clipboard
Uncaught Invariant Violation When trying to render component
I am trying to add the component inside my div buy I get the nex message:
Uncaught Invariant Violation:
addComponentAsRefTo(...): Only a ReactOwner can have refs.
You might be adding a ref to a component that was not created inside a component's render
method, or you have multiple copies of React loaded (details: https://fb.me/react-refs-must-have-owner).
here is an example:
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import { connect } from 'react-redux';
import StarRating from 'react-star-rating'
class IndexContent extends Component{
render(){
return(
<div className="index-content">
<StarRating name="small-rating" caption="" size={10} totalStars={5} rating={3} />
</div>
)}
}
I'm also facing the same issue. Probably it's trying to load react twice but I gave up on this for now. You can try this one https://github.com/voronianski/react-star-rating-component. It worked for me
Same issue here
Same issue here, any solution??
Sorry guys. I am not available to work on this at the moment. Would anyone like to be added as a contributor and help with the project?