Digital clock using React JS under 3 minutes | React interview question

preview_player
Показать описание

Forgot to return a method (unmount) from useEffect and clearInterval to avoid memory leak. It's updated in the codesandbox.

html
css
react
react tutorial
angular
angular tutorial
javascript
js
js interview
javascript interview
leetcode
javascript interview prep
interview prep
interview preparation

#interview #react #reactjs #angular #javascript #js #interviewprep #prepration #faang #maang
Рекомендации по теме
Комментарии
Автор

Hi Bro, You are doing great job. Your content was awesome.

I just modified above code with out setInterval() ..

const [date, setDate] = useState(new Date());
useEffect(() => {
setDate(new Date());
}, [date]);

Keep Good Work ..

sekarana
visit shbcf.ru