Тёмный

How to build a Stopwatch in React 🔥 | React JS Interview 

Akash Ingole
Подписаться 9 тыс.
Просмотров 5 тыс.
50% 1

Опубликовано:

 

1 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 14   
@akashingole
@akashingole Год назад
If you like the video, don't forget to comment. Thank you for watching ❤
@nitishkumarverma756
@nitishkumarverma756 Год назад
Shouldn't we use useRef for storing now as we are not going to rerender the UI for it ?
@SinghMusicpvtltd
@SinghMusicpvtltd Год назад
When u stopped the watch at 2 sec and if I want to let's continue from 2 sec then what to do sir?
@akashingole
@akashingole Год назад
In that case do not setTime in handlestart(), just set the default value of Time as Date.now()
@A1996ARP2075
@A1996ARP2075 Год назад
Thanks please keep making more interview videos like these
@pratibhayadav4916
@pratibhayadav4916 Год назад
When i create stopwatch but with different condition so how to should i go i stuck at that point please guide me how i build my logic
@akashingole
@akashingole Год назад
Hey you can text me at insta at codingjourneywithakash. Send me the ss of your code
@bhanusunka2840
@bhanusunka2840 Год назад
const handleStart = () => { setTime(Date.now()); setNow(Date.now()); clearInterval(intervalRef.current); // Edge case: clearing the previous Intervals, intervalRef.current = setInterval(() => { setTime(Date.now()); }, 10); return () => clearInterval(intervalRef.current); }; Like whenever we click restart button more than one time it doesn't stop when i click on the stop So to overcome this clearing timeInterval before creating a new one would result in more proper implementation
@sanyamjain4777
@sanyamjain4777 Год назад
Make more videos on these type of interview questions
@akashingole
@akashingole Год назад
Sure brother
@SinghMusicpvtltd
@SinghMusicpvtltd Год назад
Me learning React
@engineerthings7486
@engineerthings7486 Год назад
Nicely explained 🙂
@SinghMusicpvtltd
@SinghMusicpvtltd Год назад
Awesome Sir
@akashingole
@akashingole Год назад
Thanks brother 🙂
Далее
Build A Stopwatch App with React & TypeScript
34:12
Просмотров 4,9 тыс.
You might not need useEffect() ...
21:45
Просмотров 162 тыс.
ХОККЕЙНАЯ КЛЮШКА ИЗ БУДУЩЕГО?
00:29
DAXSHAT!!! Avaz Oxun sahnada yeg'lab yubordi
10:46
Просмотров 515 тыс.
Ко мне подкатил бармен
00:58
Просмотров 186 тыс.
STOPWATCH USING REACTJS
29:27
Просмотров 6 тыс.
Learn useRef in 11 Minutes
10:20
Просмотров 640 тыс.
How to build a Recursive React Component
21:16
Просмотров 49 тыс.
multi step form tutorial next js react hook form
2:26:36
5 JavaScript Concepts You HAVE TO KNOW
9:38
Просмотров 1,4 млн
ХОККЕЙНАЯ КЛЮШКА ИЗ БУДУЩЕГО?
00:29