範例:
async function fetchPortfolio() { const res = await axios.post(`${APIURL}/get_wallet_activities`, { walletAddress: wallet, }); return res.data; } const { data, isLoading, isError, isSuccess, refetch, fetchStatus, } = useQuery([`${wallet}/portfolio`], fetchPortfolio, { cacheTime: 36000000, staleTime: 35000000, enabled: !!wallet, });