reactjs / react-chartjs

common react charting components using chart.js
MIT License
2.93k stars 301 forks source link

Communicating with other react components #50

Closed raylenmargono closed 8 years ago

raylenmargono commented 8 years ago

Hi, I am trying to communicate with other react components, however i am getting this error

Only a ReactOwner can have refs. This usually means that you're trying to add a ref to a component that doesn't have an owner (that is, was not created inside of another component's render method). Try rendering this component inside of a new top-level component which will hold the ref.

My react-chartjs component looks like this

screen shot 2015-09-21 at 2 56 35 pm

And i am referencing it through a separate file:

screen shot 2015-09-21 at 2 56 44 pm

What seems to be the problem?

jspdown commented 8 years ago

Hi @margono13901,

Does a npm ls | grep react give you the following output?

├─┬ react@0.14.0
├── react-chartjs@0.6.0
└─┬ react-dom@0.14.0
  └─┬ react@0.14.0

This error means react has been loaded more than one time. If you got a similar output, try this:

rm -rf node_modules
npm install
joshhornby commented 8 years ago

Closing due to inactivity.