useBlockInfo
Props
Name
Type
Description
Return Type
Name
Type
Description
Basic Usage
import { useBlockInfo } from 'typink';
function BlockTracker() {
const { best, finalized } = useBlockInfo();
return (
<div>
<p>Best Block: #{best?.number}</p>
<p>Finalized Block: #{finalized?.number}</p>
<p>Best Hash: {best?.hash}</p>
</div>
);
}Last updated