Hook for fetching a block.
Specify which block to fetch with the blockIdentifier
argument.
Control if and how often data is refreshed with refetchInterval
.
This example shows how to fetch the latest block only once.
This example shows how to fetch the pending block every 3 seconds. Use your browser network monitor to verify that the hook is refetching the data.