useInfiniteSections (Hook) | Provide this hook with the amount of nodes currently available (i.e. nodes.length if working on an array) and a callback function to load more nodes. It'll work out the current view behind the scenes and choose what to render accordingly. | nodesAvailable: The amount of nodes currently available.
loadMoreCallback (optional): give the hook a function to call when more nodes need to be fetched (i.e. from your server). | { currentView, setCurrentView, windowSize }: provide this object to the InfiniteSection component as props. |
InfiniteSection (Component) | The component that'll wrap all your section-based data. You'll probably use this like {nodes.map((node, viewIndex) => <InfiniteSection currentView={currentView} setCurrentView={setCurrentView} viewIndex={viewIndex} windowSize={windowSize}>{node.data}</InfiniteSection>)} . | children: Your React children to render.
currentView, setCurrentView, windowSize: variables from useInfiniteSections hook. viewIndex: the index of the view within the array of your nodes. Probably the same as whatever you're passing for key. | React element containing your Node's children. |