@saberhq/sail
Version:
Account caching and batched loading for React-based Solana applications.
11 lines • 356 B
JavaScript
import { useMemo } from "react";
import { useAccountsData } from "./useAccountsData";
export const useAccountData = (key) => {
const theKey = useMemo(() => [key], [key]);
const [data] = useAccountsData(theKey);
return {
loading: key !== undefined && data === undefined,
data,
};
};
//# sourceMappingURL=useAccountData.js.map