question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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 issue

Hey, 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:closed
  • Created 6 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
raythreecommented, Aug 14, 2017

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

0reactions
coryhousecommented, Apr 30, 2018

Closing - Please provide simple reproducible example if issue persists.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found