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

Error: Element ref was specified as a string #28

Open
Method42 opened this issue Dec 14, 2018 · 1 comment
Open

Error: Element ref was specified as a string #28

Method42 opened this issue Dec 14, 2018 · 1 comment

Comments

@Method42
Copy link

Hello, i try to do that :
allCrowdSourced = crowdSource.map((id,index) => ({
"EAN": <Barcode value={id.ean} ref={id.ean + index} />
}));

and i get this error :
" Uncaught (in promise) Error: Element ref was specified as a string (260337780) but no owner was set. This could happen for one of the following reasons:

  1. You may be adding a ref to a function component
  2. You may be adding a ref to a component that was not created inside a component's render method
  3. You have multiple copies of React loaded "

if someone can explain me what's wrong with the component.
if i do not pass ref in Barcode i've got the same error.

Thx for help

@d-spiridonov
Copy link

have the same error, any updates on this?

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

2 participants