useChain
Hook for accessing the active Chain the current wallet is connected to
import { useChain } from "@thirdweb-dev/react-core";
Example
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>;
};