That causes an infinite loop because useEffect is triggered on renders. Here's a working way to set a timer on mount and clearing it on unmount: function App() ...
確定! 回上一頁