The hook provides an isPending boolean that you can use to handle loading states in your UI:
Copy
Ask AI
function BoostDisplay() { const { isPending, count } = useClaimableBoostsCount({ creatorAddress: "0x123...", claimantAddress: "0x456..." }); // Show loading spinner while data is being fetched if (isPending) { return <LoadingSpinner />; } // Show different messages based on count if (count === 0) { return <p>No boosts available to claim</p>; } return <p>{count} boosts ready to claim</p>;}
The hook automatically handles fetching and caching of boost data through the useRewardKitProfile hook internally.