Closed xiaoTuiMao closed 5 years ago
const Loading = () => { const { requestCount } = useMappedState(state => state.framework); const dispatch = useDispatch(); useEffect(() => { dispatch(actions.addRequestCount()); setTimeout(() => { dispatch(actions.subRequestCount()); }, 10); }, []); return ( <div className={cx(styles.container, { [styles.showLoading]: requestCount > 0 })}> <img src={loadingIcon} alt="loading" /> </div> ); };
and console in
work success console
work fail console
May you please provide a code pen with a full reproduction? There is too much going on in your example to know what the problem is.
thanks for your reply. i had try again, but I can't reproduce this bug now.
and console in
work success console
work fail console