Skip to main content

useNFT() function

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

Use this to get an individual NFT token of your NFTContract.

Example 1

const nftDrop = useNFTDrop(<ContractAddress>);
const { data: nft, isLoading, error } = useNFT(nftDrop, <tokenId>);

Example 2

const { contract } = useContract(<ContractAddress>);
const { data: nft, isLoading, error } = useNFT(contract?.nft, <tokenId>);


export declare function useNFT<TContract extends NFTContract>(
contract: RequiredParam<TContract>,
tokenId: RequiredParam<BigNumberish>,
): import("@tanstack/react-query").UseQueryResult<NFT<TContract>, unknown>;


contractRequiredParam<TContract>an instance of a NFTContract
tokenIdRequiredParam<BigNumberish>the tokenId to look up


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

a response object that includes the metadata for the given tokenId