react-barcode
react-barcode copied to clipboard
Error: Element ref was specified as a string
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:
- You may be adding a ref to a function component
- You may be adding a ref to a component that was not created inside a component's render method
- 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
have the same error, any updates on this?