You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting this error: Uncaught Error: Invariant Violation: addComponentAsRefTo(...): 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'srendermethod). Try rendering this component inside of a new top-level component which will hold the ref.
Somehow the GoogleMap component was loading a second copy of React. I think it's similar to what these people are seeing: facebook/react#3320
I had to use the PrefetchPlugin on react to get google-map-react to work. Maybe the rest of my code was loading plain old 'react' and GoogleMap is loading 'react/addons', but in any case I think it would help other developers new to google-map-react to have a note about this.
The text was updated successfully, but these errors were encountered:
jedwards1211
changed the title
addComponentAsRefTo() error due to complexity of peer dependencies?
addComponentAsRefTo() error because google_map.js loads a second copy of React
Jul 22, 2015
I'm getting this error:
Uncaught Error: Invariant Violation: addComponentAsRefTo(...): 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
rendermethod). Try rendering this component inside of a new top-level component which will hold the ref.
Somehow the GoogleMap component was loading a second copy of React. I think it's similar to what these people are seeing:
facebook/react#3320
I had to use the PrefetchPlugin on react to get google-map-react to work. Maybe the rest of my code was loading plain old 'react' and GoogleMap is loading 'react/addons', but in any case I think it would help other developers new to google-map-react to have a note about this.
The text was updated successfully, but these errors were encountered: