Docs

AutoConnect

AutoConnect last connected wallet on page reload or revisit. Note: If you are using ConnectButton or ConnectEmbed components, You don't need to use this component as it is already included.

This is useful if you are manually connecting the wallets using the useConnect hook and want to auto connect the last connected wallets on page reload or revisit.

Example

import { AutoConnect } from "thirdweb/react";
import { createWallet, inAppWallet } from "thirdweb/wallets";
// list of wallets that your app uses
const wallets = [
inAppWallet(),
createWallet("io.metamask"),
createWallet("me.rainbow"),
];
function Example() {
return (
<AutoConnect
wallets={wallets}
client={client}
appMetadata={appMetadata}
/>
);
}

Parameters

Returns