Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uncaught Invariant Violation When trying to render component #35

Open
jasmo2 opened this issue Sep 29, 2016 · 4 comments
Open

Uncaught Invariant Violation When trying to render component #35

jasmo2 opened this issue Sep 29, 2016 · 4 comments

Comments

@jasmo2
Copy link

jasmo2 commented Sep 29, 2016

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>
  )}
}
@priyanshuchauhan
Copy link

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

@benbristow
Copy link

Same issue here

@Dsantacruz
Copy link

Same issue here, any solution??

@ninjasort
Copy link
Owner

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants