Skip to content

Commit 3b75143

Browse files
docs: Update useConnect example with client param (#5550)
1 parent b117cb1 commit 3b75143

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/thirdweb/src/react/core/hooks/wallets/useConnect.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ import { useSetActiveWalletConnectionStatus } from "./useSetActiveWalletConnecti
1111
* @returns A function that lets you connect a wallet.
1212
* @example
1313
* ```jsx
14+
* import { createThirdwebClient } from "thirdweb";
1415
* import { useConnect } from "thirdweb/react";
1516
* import { createWallet } from "thirdweb/wallets";
1617
*
18+
* const client = createThirdwebClient({
19+
* clientId: "YOUR_CLIENT_ID",
20+
* });
21+
*
1722
* function Example() {
1823
* const { connect, isConnecting, error } = useConnect();
1924
* return (
@@ -23,7 +28,9 @@ import { useSetActiveWalletConnectionStatus } from "./useSetActiveWalletConnecti
2328
* // instantiate wallet
2429
* const wallet = createWallet("io.metamask");
2530
* // connect wallet
26-
* await wallet.connect();
31+
* await wallet.connect({
32+
* client,
33+
* });
2734
* // return the wallet
2835
* return wallet;
2936
* })

0 commit comments

Comments
 (0)