📅  最后修改于: 2022-03-11 15:02:29.600000             🧑  作者: Mango
const Loading = () => {
const [loadingStatus, setLoadingStatus] = useState(".");
useEffect(() => {
const intervalId = setInterval(() => {
setLoadingStatus(ls => ls + ".");
}, 1000);
return () => clearInterval(intervalId);
}, []);
return {`Loading ${loadingStatus}`}
;
};