DOCS

useAddress

Hook for getting the currently connected wallet address.

Returns undefined if no wallet is connected.

Usage

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

function App() {
  const address = useAddress();

  if (!address) return <div>No wallet connected</div>;

  return <div>My wallet address is {address}</div>;
}

Returns

string | undefined;
  • Returns a string containing the wallet address.
  • Returns undefined if no wallet is connected.