Ho-s / Calendar

Calendar / Scheduler web app
0 stars 0 forks source link

setInterval 에러 #15

Open Ho-s opened 3 years ago

Ho-s commented 3 years ago

let intervalHandler: NodeJS.Timeout;

useEffect(() => { intervalHandler = setInterval(() => { setNow(moment()); }, 500);

return () => {
  clearInterval(intervalHandler);
};

}, []);