useBlockNumber

Hook that watches for changes in the block number on a given chain.

Example

import { useBlockNumber } from "thirdweb/react";
const blockNumber = useBlockNumber({ client, chain });

Parameters

Returns

The latest block number.