react-infinite-scroller
react-infinite-scroller copied to clipboard
initialLoad does not seem to work
I have made and assumption that that the initialLoad (default true) prop causes InfiniteScroll to call loadMore when it is first mounted. This would be great but it seems not to be the case. The initialLoad check is after a hasMore check. When the component is first loaded, the data has not necessarily been primed to hasMore will be its default falsey value. As a result, initialLoad will never be checked.
Working around this is relatively easy, kick off a load in some other component's componentWillMount() but it would be convenient if this was all co-located.
Yeah, you right initialLoad didn't work as expected.
I made the same assumption, the readme page description should probably be more descriptive.
Also, keep in mind that the loading function will not be triggered if your scrolling offset does not hit the threshold that you set (250 px by default)