useEnsName

Get the ENS name and avatar for an address

Example

import { useEnsName } from "thirdweb/react";
const { data: ensName } = useEnsName({
client,
address: "0x1234...",
});
function useEnsName(options: {
address: undefined | string;
client: ThirdwebClient;
}): UseQueryResult<null | string, Error>;

Parameters

the client and address to get the ENS name and avatar for

Type

let options: { address: undefined | string; client: ThirdwebClient };

Returns

let returnType: UseQueryResult<null | string, Error>;
  • a query object that resolves to the ENS name