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
See original GitHub issueHey, After installing the slingshot, I have added material-ui@0.18.7 to the application and when running the most basic application, and using a component from material-ui I get this error :
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
Node version: 7.9.0 npm version: 5.3.0 Operating system: Windows 10
Can somone help please? Thanks!
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Refs Must Have Owner Warning - React
You might be adding a ref to a component that was not created inside a component's render method, or you have multiple copies...
Read more >addComponentAsRefTo Invariant Violation · GitHub
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...
Read more >Refs to Components | React
Let's look at how to get a ref, and then dive into a complete example. The ref returned from ReactDOM.render #. Not to...
Read more >A complete guide to React refs - LogRocket Blog
React doesn't provide an easy way to do this, so we can use refs to access ... components in the past, we used...
Read more >Fixing the Jest Error, "Invariant Violation
Only a ReactOwner can have refs. You might be adding a ref to a component that was not created inside a component's `render`...
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 FreeTop 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
Top GitHub Comments
I’ve not tried with those versions, but I have a couple of slingshot starter apps that remove the demo and put in one sample component. I have one for bootstrap and one for material-ui which worked fine:
https://github.com/raythree/slingshot-hello-mui
Closing - Please provide simple reproducible example if issue persists.