web3modal icon indicating copy to clipboard operation
web3modal copied to clipboard

[docs] useDisconect() has no example for vue in Vue section

Open ultraKelevra opened this issue 1 year ago • 1 comments

Summary

// import useDisconnect from wagmi if on EVM
//import useDisconnect from @reown/appkit-solana/vue if on Solana
const { disconnect } = useDisconnect()

disconnect()

Only examples for wagmi and appkit-solana are provided. Do I have to install wagmi if I want to use vue with eth anyways?

I don't have it clear.

I also tried to find a similar "useDisconnect" function in the "@reown/appkit/vue" package (in all packages actually) but found none so I assume there is no function for that in the new version. In any case, I come from the old wallet connect V3 and some sort of clarification should be put in this section of the documentation. Because my first thought was that it's a "missing feature" and not a documentation problem.

Link to the related docs page

https://docs.reown.com/appkit/vue/core/composables#usedisconnect

ultraKelevra avatar Sep 18 '24 18:09 ultraKelevra

Totally agree, imagine the installation of the whole wagmi just for that hook... no ethers example as well...

DobromirKirovLime avatar Oct 01 '24 14:10 DobromirKirovLime

This is fixed in the latest release. You should be able to get useDisconnect hook from @reown/appkit/vue like this.

import { useDisconnect } from '@reown/appkit/vue'

const { disconnect } = useDisconnect()

await disconnect()

0xmkh avatar Jan 23 '25 10:01 0xmkh