-
Notifications
You must be signed in to change notification settings - Fork 510
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
ref
is not a prop. Trying to access it will result in undefined
being returned.
#108
Comments
ref
is not a prop. Trying to access it will result in undefined
being returned.
ref
is not a prop. Trying to access it will result in undefined
being returned.ref
is not a prop. Trying to access it will result in undefined
being returned.
+1 |
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 <InfiniteScroll ref={c => this._scroll = c}>
{items}
</InfiniteScroll> |
Hello, I was able to reproduce the react warning using the example below. Not sure why that warning is triggered. The ref is using a callback function (same as your example above). Note that I need the ref for a "more ..." button on the screen. The more button can be clicked to load more rows if required. This is usually only needed for vertically tall displays when the number of rows loaded does not reach to the bottom of the screen (therefore the scroll event cannot be triggered, despite there still being more rows to display).
|
Hi. Any updates here? The issue is still being reproduced... |
Hi.Is There no final solution? |
Is this lib abandoned? |
Hello, I try to delete all ref props, it work fine, without error in my project, but the test 'should attach scroll listeners' fail in the plugin... Has anyone found a solution ? |
Any solution to start at bottom? |
For those who are looking for a solution. I created an PR here #268, hopefully this repo maintainer can merge it and publish a new version. Before it merged, you guys can temporarily use this package alternatively "@meikidd/react-infinite-scroller" |
Warning: 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.
The text was updated successfully, but these errors were encountered: