NFT Prebuilt components
We are excited to introduce a new set of prebuilt React components for NFT. The new prebuilt components have been introduced to streamline the development process for dApps. They focus on fetching and displaying essential info of a given NFT such as name, description, and media. We aim to simplify NFT integration and improve user experience in blockchain applications with upcoming updates.
Basic usage:
import { getContract } from "thirdweb";
import { NFT } from "thirdweb/react";
import { Suspense } from "react";
const nftContract = getContract({
address: "0x...",
chain: ethereum,
client: yourThirdwebClient,
});
function App() {
return <NFT contract={nftContract} tokenId={0n}>
{/* Show the info for tokenId #0 from the `nftContract` */}
<Suspense fallback={"Loading info..."}>
<NFT.Media />
<NFT.Name />
<NFT.Description />
</Suspense>
</NFT>
}