Skip to content

Commit 05e353c

Browse files
committed
chore(docs): update react & vue to connect.mutate
1 parent 9dd6549 commit 05e353c

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

site/react/api/hooks/useConnect.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Hook for connecting accounts with connectors.
77
const packageName = 'wagmi'
88
const actionName = 'connect'
99
const typeName = 'Connect'
10-
const mutate = 'connect'
10+
const mutate = 'mutate'
1111
const TData = '{ accounts: readonly [Address, ...Address[]]; chainId: number; }'
1212
const TError = 'ConnectErrorType'
1313
const TVariables = '{ chainId?: number | undefined; connector?: CreateConnectorFn | Connector | undefined; }'
@@ -31,10 +31,10 @@ import { useConnect } from 'wagmi'
3131
import { injected } from 'wagmi/connectors'
3232

3333
function App() {
34-
const { connect } = useConnect()
34+
const { mutate } = useConnect()
3535

3636
return (
37-
<button onClick={() => connect({ connector: injected() })}>
37+
<button onClick={() => mutate({ connector: injected() })}>
3838
Connect
3939
</button>
4040
)
@@ -88,12 +88,12 @@ Globally configured connectors via [`createConfig`](/react/api/createConfig#conn
8888
import { useConnect } from 'wagmi'
8989

9090
function App() {
91-
const { connect, connectors } = useConnect()
91+
const { mutate, connectors } = useConnect()
9292

9393
return (
9494
<div>
9595
{connectors.map((connector) => (
96-
<button key={connector.id} onClick={() => connect({ connector })}>
96+
<button key={connector.id} onClick={() => mutate({ connector })}>
9797
{connector.name}
9898
</button>
9999
))}

site/react/api/hooks/useDisconnect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Hook for disconnecting connections.
77
const packageName = 'wagmi'
88
const actionName = 'disconnect'
99
const typeName = 'Disconnect'
10-
const mutate = 'disconnect'
10+
const mutate = 'mutate'
1111
const TData = 'void'
1212
const TError = 'DisconnectErrorType'
1313
const TVariables = '{ connector?: Connector | undefined; }'

site/vue/api/composables/useConnect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Composable for connecting accounts with connectors.
77
const packageName = '@wagmi/vue'
88
const actionName = 'connect'
99
const typeName = 'Connect'
10-
const mutate = 'connect'
10+
const mutate = 'mutate'
1111
const TData = '{ accounts: readonly [Address, ...Address[]]; chainId: number; }'
1212
const TError = 'ConnectErrorType'
1313
const TVariables = '{ chainId?: number | undefined; connector?: CreateConnectorFn | Connector | undefined; }'

site/vue/api/composables/useDisconnect.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description: Composable for disconnecting connections.
77
const packageName = '@wagmi/vue'
88
const actionName = 'disconnect'
99
const typeName = 'Disconnect'
10-
const mutate = 'disconnect'
10+
const mutate = 'mutate'
1111
const TData = 'void'
1212
const TError = 'DisconnectErrorType'
1313
const TVariables = '{ connector?: Connector | undefined; }'

0 commit comments

Comments
 (0)