Skip to main content

useListingsCount() function

This feature is currently in beta and may change based on feedback that we receive.

Use this to get a count of all listings on your marketplace contract.

Example

const { data: listings, isLoading, error } = useListings(<YourMarketplaceContractInstance>);

Signature:

export declare function useListingsCount(
contract: RequiredParam<Marketplace>,
): import("@tanstack/react-query").UseQueryResult<BigNumber, unknown>;

Parameters

ParameterTypeDescription
contractRequiredParam<Marketplace>an instance of a marketplace contract

Returns:

import("@tanstack/react-query").UseQueryResult<BigNumber, unknown>

a response object that includes an array of listings