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

addComponentAsRefTo Invariant Violation #1

Closed
Riccardo-Zanutta opened this issue Jun 3, 2016 · 5 comments
Closed

addComponentAsRefTo Invariant Violation #1

Riccardo-Zanutta opened this issue Jun 3, 2016 · 5 comments

Comments

@Riccardo-Zanutta
Copy link

Hi,
I have some problem integrating this component in my pure React application.
this is the code:

QrCode

Login

And this is the error message I found:

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).

Already tried this: https://gist.github.com/jimfb/4faa6cbfb1ef476bd105 . Removed npm_modules/ folder and npm install again but didn't work. Any clue about that?
Thanks

@gregogalante
Copy link

I have the same problem too..

@JodusNodus
Copy link
Owner

I am looking in to this. I first though the problem was that i required react as a dependency and not as a peer dependency. But the problem still occurs.

@Riccardo-Zanutta
Copy link
Author

@JodusNodus thanks, if you need any help, I'm available.

@JodusNodus
Copy link
Owner

It should work now. In the test i was able to use a ref without any errors. I will publish this to npm as version 0.2.4. If it works for you then we can close the issue.

@Riccardo-Zanutta
Copy link
Author

Thanks @JodusNodus, now it's working fine. We can close the issue :)

JodusNodus pushed a commit that referenced this issue Jan 4, 2019
Check if `mediaDevices` is truthy
amirhoseingorji pushed a commit to amirhoseingorji/react-qr-reader that referenced this issue Sep 26, 2021
…meras-fix

Bugfix/multiple rear cameras fix
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