Hook for fetching the current block number.
Control if and how often data is refreshed with refetchInterval
.
This example shows how to fetch the current block only once.
This example shows how to fetch the current block every 3 seconds. Use your browser network monitor to verify that the hook is refetching the data.