Warning: `ref` is not a prop
See original GitHub issueHello,
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:
- Created 6 years ago
- Reactions:43
- Comments:15 (2 by maintainers)
Top 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 >
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 Free
Top 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
Any updates regarding this?
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