Error: Invariant Violation: addComponentAsRefTo
See original GitHub issueSeeing this error in the latest 0.6.1:
Error: Invariant Violation: 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
Anyone else having this issue?
Issue Analytics
- State:
- Created 8 years ago
- Reactions:1
- Comments:15
Top Results From Across the Web
addComponentAsRefTo(...): Only a ReactOwner can have refs ...
Uncaught Error: Invariant Violation: addComponentAsRefTo(. ... I'm getting the same error, with no indication that I'm loading React more ...
Read more >React ref not working Invariant Violation - Stack Overflow
Below is the error message. invariant.js:39Uncaught Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs.
Read more >Fixing the Jest Error, "Invariant Violation
Jest sometimes fails with an error, "Invariant Violation: addComponentAsRefTo". This how-to discusses a solution for the error & speculates ...
Read more >`Error: Invariant Violation: addComponentAsRefTo(...): Only a ...
Coding example for the question Testing: `Error: Invariant Violation: addComponentAsRefTo(...): Only a ReactOwner can have refs.` error-Reactjs.
Read more >Refs Must Have Owner Warning - React
addComponentAsRefTo (…): Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yup @antoinerey that worked for me. Closing this issue.
This error with: 15.6.2 -react, 3.1.13 - react- modal