Answer the question
In order to leave comments, you need to log in
`
Multiple fetch requests?
there is action
@action
getLogList = async (range, type) => {
this.isLoading = true;
try {
const result = await Http.get(`${serverApi}/log-list?range=${range}&type=${type}`);
console.log(result, 'result');
this.chartsData[type] = result.data;
this.isLoading = false;
this.isError = false;
this.errorMsg = null;
} catch (e) {
this.chartsData[type] = null;
this.isLoading = false;
this.isError = true;
this.errorMsg = e;
}
};
useEffect(() => {
getLogList('1', 'markeCap'),
getLogList('1', 'newTotalSupply'),
getLogList('1', 'marketCap'),
}, [getLogList]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question