Function useLoadMore

  • Hook for loading more results by specified pageSize value

    Parameters

    • pageSize: number = 24

      number of additional products to load (default=24)

    Returns { href: string; loadMore: (e?: MouseEvent) => Promise<void> }

     function LoadMoreButton({ pageSize }) {
    const { loadMore, href } = useLoadMore(pageSize)

    return (
    <a
    class="ns-load-more-button ns-act-btn ns-act-btn-light"
    onClick={loadMore}
    href={href}
    >
    More results
    </a>
    )
    }