Skip to main content

react package

Functions

FunctionDescription
useCoinbaseWallet()

Hook for connecting to a Coinbase wallet.

import { useCoinbaseWallet } from "@thirdweb-dev/react";

| | useDisconnect(options) |

Hook for disconnecting the currently connected wallet

import { useDisconnect } from "@thirdweb-dev/react";

| | useMetamask() |

Hook for connecting to a Metamask wallet.

import { useMetamask } from "@thirdweb-dev/react";

| | useNetwork() | Hook for getting metadata about the network the current wallet is connected to and switching networks | | useResolvedMediaType(uri) | | | useWalletConnect() |

Hook for connecting to a mobile wallet with Wallet Connect

import { useWalletConnect } from "@thirdweb-dev/react";

|

Interfaces

InterfaceDescription
DAppMetaDatathe metadata to pass to wallet connection dialog (may show up during the wallet-connection process)
MediaRendererPropsThe props for the MediaRenderer component.
MediaType
SharedMediaProps
ThirdwebNftMediaPropsThe props for the ThirdwebNftMedia component.
ThirdwebProviderPropsThe possible props for the ThirdwebProvider.

Variables

VariableDescription
ConnectWallet

(BETA) A component that allows the user to connect their wallet.

The button has to be wrapped in a ThirdwebProvider in order to function.

MediaRenderer

This component can be used to render any media type, including image, audio, video, and html files. Its convenient for rendering NFT media files, as these can be a variety of different types. The component falls back to a external link if the media type is not supported.

Props: MediaRendererProps

ThirdwebNftMediaThis component can be used to render NFTs from the thirdweb SDK. Props: ThirdwebNftMediaProps
ThirdwebProviderThe <ThirdwebProvider /> component lets you control what networks you want users to connect to, what types of wallets can connect to your app, and the settings for the [Typescript SDK](https://docs.thirdweb.com/typescript).
Web3Button

(BETA) A component that allows the user to call an on-chain function on a contract.

The button has to be wrapped in a ThirdwebProvider in order to function.