diff --git a/docs/javascript/v2/how-to-guides/set-up-video-conferencing/peerlist-optimizations.mdx b/docs/javascript/v2/how-to-guides/set-up-video-conferencing/peerlist-optimizations.mdx index 11135752a8..928e09577a 100644 --- a/docs/javascript/v2/how-to-guides/set-up-video-conferencing/peerlist-optimizations.mdx +++ b/docs/javascript/v2/how-to-guides/set-up-video-conferencing/peerlist-optimizations.mdx @@ -54,6 +54,8 @@ import { usePaginatedParticipants } from '@100mslive/react-sdk'; const PaginatedPeers = () => { const { peers, total, loadPeers, loadMorePeers } = usePaginatedParticipants({ role: roleName, limit: 20 }); + // to check if there are more peers + const hasNext = total > peers.length; useEffect(() => { loadPeers();