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.

Warning: `ref` is not a prop

See original GitHub issue

Hello,

I am using ref in <Select.Creatable ref={(node) => this.selector = node} /> and getting this warning: CreatableSelect: ref is not a prop. Trying to access it will result in undefined being returned. If you need to access the same value within the child component, you should pass it as a different prop.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:43
  • Comments:15 (2 by maintainers)

github_iconTop GitHub Comments

27reactions
Moejoe90commented, Jun 6, 2018

Any updates regarding this?

6reactions
jonfreedmancommented, Jan 11, 2018

I am also seeing this warning in the console, it would be great to be able get rid of it.

This is with react 16.2.0 & react-select 1.2.0

Read more comments on GitHub >

github_iconTop Results From Across the Web

React: ref is not a prop - Stack Overflow
ref and key are reserved prop names in React, and are used internally. That's why you are getting this warning.
Read more >
Refs can't be props in React - Scrimba.com
"Warning: FancyButton: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the...
Read more >
Forwarding Refs - React
Regular function or class components don't receive the ref argument, and ref is not available in props either. Ref forwarding is not limited...
Read more >
Key is not a prop. Trying to access it will result in `undefined`
The warning " key is not a prop. Trying to access it will result in undefined being returned" is caused when we try...
Read more >
ref prop should not be used on React function components
This rule was introduced in DeepScan 1.27.0. See. React Warning: Function components cannot be given refs. Attempts to access this ref will fail ......
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