react-window-infinite-loader: Invalid list ref
See original GitHub issueI’ve followed the instructions on the infinite loader documentation but I’m still seeing this warning in the console: Invalid list ref; please refer to InfiniteLoader documentation.
My code:
import InfiniteLoader from "react-window-infinite-loader";
const infiniteLoaderRef = useRef<InfiniteLoader>(null);
<InfiniteLoader
isItemLoaded={index => index < items.length}
itemCount={1000}
threshold={20}
loadMoreItems={loadMoreItems}
ref={infiniteLoaderRef}
>
...
</InfiniteLoader>
What am I doing wrong here? Thanks!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:9
Top Results From Across the Web
react-window and infinite loader scrolling issue - Stack Overflow
When I scroll down, infiniteloader loads the data normally for the first time only. But then it loads after my window view is...
Read more >react-window-infinite-loader - npm
Function responsible for tracking the loaded state of each item. itemCount, number, Number of rows in list; can be arbitrary high number if ......
Read more >react-window-infinite-loader - npm package - Snyk
Learn more about react-window-infinite-loader: package health score, ... For example, after a list has been sorted, previously cached items may be invalid.
Read more >React-window-infinite-loader - npm.io
Name, Type, Description. children, ({ onItemsRendered: Function, ref: React$Ref }) => React$Node, Render prop. See below for example usage.
Read more >Virtualize large lists with react-window - web.dev
In here, the FixedSizeList component is wrapped within the InfiniteLoader . The props assigned to the loader are: isItemLoaded : Method that ...
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
Can you try swapping
InfiniteLoader
andAutoSizer
so that you haveAutoSizer
as the outer component?That worked for me if I remember correctly.
I am having the same issue even though I have the AutoSizer as the outer component