List with Footer Example
Customize the Virtuoso component rendering by passing components through the components property.
For example, the Footer component will render at the bottom of the list.
The footer can be used for loading indicators or “load more” buttons.
Scroll to the bottom of the list to see end reached.
import { Virtuoso } from 'react-virtuoso'
function Footer() {
return (<div style={{ padding: '1rem', textAlign: 'center', }} > end reached </div>)
}
export default function App() {
return (
<Virtuoso
style={{ height: '100%' }}
totalCount={100}
components={{ Footer: Footer }}
itemContent={(index) => ( <div>Item {index}</div>)}
/>
)
}