Skip to content

useNetwork

Hook for accessing the current connected chain.

Usage

import { useNetwork } from "@starknet-react/core";
 
const { chain, chains } = useNetwork();

Returns

chain

  • Type: Chain

The current chain.

chains

  • Type: Chain[]

List of supported chains.