πŸ“š Use this hook to get the current (latest) bid of the selected collection item.


VERY IMPORTANT: This hook is currently in an experimental stage.

This means that breaking changes will happen in minor AND patch releases. Use at your own risk. If you choose to rely on this in production in an experimental stage, please lock your version to a patch-level version to avoid unexpected breakages.

The item will be automatically selected based on url parameters from urlPattern (see MojitoHooksProvider for more details).

The useCollectionItemCurrentBid hook will return the current bid from calling the items API.

Hooks Sample Code

import useCollectionItemCurrentBid from "mojito-hooks/useCollectionItemCurrentBid";

function App {
    const { currentBid, isLoading } = useCollectionItemCurrentBid();

    if(isLoading) return <Loader />;

    if(currentBid) return <DrawBid bid={currentBid} />;

    return <div>No bids available</div>


collectionItemIDThe collection item ID.String


currentBidsArray of bids associated with the collection item ID.MojitoMarketplaceAuctionBid[]
isLoadingDisplay request loading status, provided for convenience.Boolean
errorThe error object for the query, if an error was thrown.Error
refetchA function to manually refetch the query.(options: T) => Promise<U>
queryResultOriginal React-Query query result.QueryResult<T>