In the previous version, I use children.length
to get the number of child, but this approach will fail when the children is not a 1d array. In the new version, I use React.Children.toArray
to get a 1d array of the children such that InfiniteScroll
can deal with children like normal React.Element
Full Changelog: v2.0.0...v2.0.3