@saberhq/sail
Version:
Account caching and batched loading for React-based Solana applications.
15 lines • 540 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.useAccountData = void 0;
const react_1 = require("react");
const useAccountsData_1 = require("./useAccountsData");
const useAccountData = (key) => {
const theKey = (0, react_1.useMemo)(() => [key], [key]);
const [data] = (0, useAccountsData_1.useAccountsData)(theKey);
return {
loading: key !== undefined && data === undefined,
data,
};
};
exports.useAccountData = useAccountData;
//# sourceMappingURL=useAccountData.js.map
;