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

Suggestions on fixing - "Only a ReactOwner can have refs" #1704

Closed
SFPink opened this issue May 5, 2017 · 6 comments
Closed

Suggestions on fixing - "Only a ReactOwner can have refs" #1704

SFPink opened this issue May 5, 2017 · 6 comments
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet

Comments

@SFPink
Copy link

SFPink commented May 5, 2017

Hello, I've just stumbled across this plugin and would really like to use it however I have this issue (I'm sure we have all seen this before): "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". Apologises for creating another bug about this issue, there are a few others however I didn't want to reopen old issues.

I've checked the additional details here: https://facebook.github.io/react/warnings/refs-must-have-owner.html

I'm not using any refs, I'm simply using the select as basically as I can.
I don't have multiple instances of react, I've checked the other node modules folders and ran "npm ls react" which only returns one instance. ( I'm using npm and gulp if that makes a difference )
I've updated node and npm
I've deleted all node modules and reinstalled
I've followed this link: https://gist.github.com/jimfb/4faa6cbfb1ef476bd105

Is there anything else I can try before giving up?

Regards

@agirton
Copy link
Collaborator

agirton commented May 6, 2017

Hi @SFPink,

Do you have a reproducible case? A gist, plunker(https://plnkr.co/edit/HTmtER9AMNcPoWhXV707?p=preview), or small repo. This will help us better understand how you ran into this.

All the best

@llioor
Copy link

llioor commented May 9, 2017

I have the same issue.

@SFPink
Copy link
Author

SFPink commented May 10, 2017

Currently I cannot provide a working example as my project is rather large. I will try and work out an extracted test case.

@agirton agirton added the issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet label May 20, 2017
@steezeburger
Copy link

I am also seeing this error. I'm developing a shared component in a Lerna repo, and when importing this component in another app in the Lerna repo, we see this error.

I tried adding 'react' and' react-dom' to Webpack's externals config, but then I get an error that 'react' is not found when running Webpack for the parent app.

@dimonnwc3
Copy link

@steezeburger the same problem I see when I use npm link in our external components library, which uses react-select
it works fine if I just drop react-select or don't use in current rendered component

@bladey
Copy link
Contributor

bladey commented May 27, 2020

Hello -

In an effort to sustain the react-select project going forward, we're closing old issues / pull requests.

We understand this might be inconvenient but in the best interest of supporting the broader community we have to direct our limited efforts to maintain the latest version.

If you feel this issue / pull request is still relevant and you'd like us to review it, please leave a comment and we'll do our best to get back to you.

@bladey bladey closed this as completed May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet
Projects
None yet
Development

No branches or pull requests

6 participants