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 Error: Invariant Violation: addComponentAsRefTo(...) #148

Closed
AddictArts opened this issue Aug 13, 2015 · 4 comments
Closed

Uncaught Error: Invariant Violation: addComponentAsRefTo(...) #148

AddictArts opened this issue Aug 13, 2015 · 4 comments

Comments

@AddictArts
Copy link

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

Just testing a simple component taken from the cosmos-example and I pulled out flux and the store leaving just the simple button.

@ovidiuch
Copy link
Member

Just testing a simple component taken from the cosmos-example and I pulled out flux and the store leaving just the simple button.

Can you please describe the steps to reproduce this more accurately? I removed the Flux button along with the dispatcher and store and the other components worked just fine.

@AddictArts
Copy link
Author

I setup a new folder with and starter with my own webpack config plus react, css-loader, etc. Then I created the folders src/components, etc. Then installed cosmos-js and copied the simple button component from the example. That is what I remember and unfortunately can't reproduce it. So, you can close this. Thanks

@ovidiuch
Copy link
Member

Thanks.

@gaearon
Copy link
Contributor

gaearon commented Aug 22, 2015

This error means you had a duplicate React in the bundle, and different components were rendered with different versions.

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

3 participants