`ref` is not a prop. Trying to access it will result in `undefined` being returned.
See original GitHub issueWarning: InfiniteScroll: `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. (https://fb.me/react-special-props)
It would be great to change the name of ‘ref’ prop to something other, because it is reserved in React for special props.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:12
- Comments:9 (1 by maintainers)
Top Results From Across the Web
React: ref is not a prop - Stack Overflow
1 Answer 1 · I do not have ref or key defined in any of my react components. – shawn · Some the...
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 >Warning: ref is not a prop #2181 - JedWatson/react-select
Trying to access it will result in undefined being returned. If you need to access the same value within the child component, you...
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
function FancyButton(props) { return ( <button className="FancyButton"> ... Other components using FancyButton usually will not need to obtain a ref to the ...
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 FreeTop 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
Top GitHub Comments
Is this lib abandoned?
A code example would be nice. I don’t see the need for accessing the ref prop on any component. You should be passing function refs instead of strings, yeah? Then there’s no need to call on
InfiniteScroller.props.ref
.