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.

Element ref was specified as a string (value0) but no owner was set. You may have multiple copies of React loaded. (details: https://fb.me/react-refs-must-have-owner)

See original GitHub issue

Are you asking a question?

No, just a proposal

Are you reporting a bug or runtime error?

Yes. all error just after I upgrade react to version 16.

Element ref was specified as a string (value0) but no owner was set. You may have multiple copies of React loaded. (details: https://fb.me/react-refs-must-have-owner).

My code is here:

<Select
    name="foo"
    value={this.state.input.get('foo')}
    options={fooOptions}
    placeholder="foo"
    onChange={this.metaUpdateInput('foo')}
/>

and I review this repo, notice this line may occur this error:

ref={'value' + index}

in src/Select Line 929

React 16, React-Select 1.0.0-rc.10

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:5
  • Comments:20 (1 by maintainers)

github_iconTop GitHub Comments

47reactions
knoxjeffreycommented, Dec 7, 2017

I finally resolved this by making an edit in my webpack setup to specifically state where to use the required version of react. Something similar to the following, with an alteration to the node modules path, will hopefully help some people:

resolve: { alias: { 'react': path.resolve(__dirname, '../../node_modules', 'react') } }

10reactions
ghostcommented, Oct 20, 2017

I have the same problem !!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Refs Must Have Owner Warning - React
Element ref was specified as a string (myRefName) but no owner was set. You may have multiple copies of React loaded. (details: https://fb.me/react-refs-must- ......
Read more >
React JS: Element ref was specified as a string (inner) but no ...
You may be adding a ref to a component that was not created inside a component's render method 3. You have multiple copies...
Read more >
react-to-print - npm
So you've created a React component and would love to give end users the ability to print out the contents of that component....
Read more >
React Stripe.js reference | Stripe Documentation
Learn about React components for Stripe.js and Stripe Elements. ... You can use Elements with any Stripe product to collect online payments.
Read more >
Everything You Need to Know About Refs in React
Short for “reference”, refs are a way to access underlying DOM elements in a React component. There are many reasons why you would...
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