Hook for accessing the active Chain the current wallet is connected to
import { useChain } from "@thirdweb-dev/react-core" Copy
import { useChain } from "@thirdweb-dev/react-core"
You can get the chain of the connected wallet by using the hook as follows:
import { useChain } from "@thirdweb-dev/react-core"const App = () => { const chain = useChain() return <div>{chain.chainId}</div>} Copy
import { useChain } from "@thirdweb-dev/react-core"const App = () => { const chain = useChain() return <div>{chain.chainId}</div>}
Documentation
Generated using TypeDoc
Hook for accessing the active Chain the current wallet is connected to