Build a DIGITAL CLOCK using React in 15 minutes! 🕒

  Рет қаралды 19,391

Bro Code

Bro Code

Күн бұрын

Пікірлер: 45
@BroCodez
@BroCodez 10 ай бұрын
import DigitalClock from './DigitalClock.jsx'; function App() { return ( ) } export default App body{ background-image: url(assets/background.jpg); background-position: center; background-repeat: no-repeat; background-size: cover; background-attachment: fixed; margin: 0; /* OPTIONAL */ display: flex; justify-content: center; min-height: 100vh; align-items: center; } .clock-container{ backdrop-filter: blur(5px); width: 100vw; padding: 10px 0; } .clock{ color: white; font-size: 6rem; font-weight: bold; font-family: monospace; text-align: center; text-shadow: 3px 3px 5px hsla(0, 0%, 0%, 0.75); } import React, {useState, useEffect} from 'react'; function DigitalClock(){ const [time, setTime] = useState(new Date()); useEffect(() => { const intervalId = setInterval(() => { setTime(new Date()); }, 1000); return () => { clearInterval(intervalId); } }, []); function formatTime(){ let hours = time.getHours(); const minutes = time.getMinutes(); const seconds = time.getSeconds(); const meridiem = hours >= 12 ? "PM" : "AM"; hours = hours % 12 || 12; return `${padZero(hours)}:${padZero(minutes)}:${padZero(seconds)} ${meridiem}`; } function padZero(number){ return (number < 10 ? "0" : "") + number; } return( {formatTime()} ); } export default DigitalClock;
@-ECE-RaviShankar
@-ECE-RaviShankar 10 ай бұрын
First comment.............yeah big fan from india, can you please tell when this series is completed.
@reiayanami1441
@reiayanami1441 10 ай бұрын
we need a full course of react, please bro. love your videos from italy
@BroCodez
@BroCodez 10 ай бұрын
Coming soon!
@MrBaninations
@MrBaninations 10 ай бұрын
Broo@@BroCodez​, It will also include Redux, right? You're the best Teacher out here
@greengoatsh1t888
@greengoatsh1t888 10 ай бұрын
@@BroCodez 🔥🔥🔥
@salad333
@salad333 10 ай бұрын
@@BroCodez please do, i'm still struggling how to install React in Visual Studio code 😑😐
@tasneemayham974
@tasneemayham974 10 ай бұрын
Yes!!! PLEASEEE!!! i RUN AWAY WHENEVER I SEE REACT!! WE NEED YOU BRUHHH!!!
@ITBIENVENU
@ITBIENVENU 19 күн бұрын
thanks bro code, you remind me more css 🤣🤣, i'm your big fan from rwanda
@BishanTamang-rk5ji
@BishanTamang-rk5ji 10 ай бұрын
Make java 2024 plz....Big fan love from Nepal
@DomingoMateo-e8t
@DomingoMateo-e8t 10 ай бұрын
Im beginner but this is awesome!!! Im learning to much!! Thkssssss
@Albert_Hall
@Albert_Hall 6 ай бұрын
Great great Thank you With gratefulness from Caucasus
@Thaisann-f3l
@Thaisann-f3l 10 ай бұрын
I really like your video Bro Code. I try to learn about your video until the end
@-ECE-RaviShankar
@-ECE-RaviShankar 10 ай бұрын
First comment.............yeah big fan from india, can you please tell when this series is completed.
@BroCodez
@BroCodez 10 ай бұрын
Early February is my goal
@-ECE-RaviShankar
@-ECE-RaviShankar 10 ай бұрын
Ok , I am following your JS Full course of 2024 and omg it is just like a wow...@@BroCodez
@talhakhan4684
@talhakhan4684 6 ай бұрын
@@BroCodez Hi bro, do you have any plans to make videos on react-router-dom and redux-toolkit?
@alfaorionis69
@alfaorionis69 Ай бұрын
thank you Bro, your tut orial is very instructive
@alivejack
@alivejack 2 ай бұрын
0:56 defauly 😂😂❤
@josea8320
@josea8320 10 ай бұрын
Genial, saludos desde Perú!
@KingOfMadnesss
@KingOfMadnesss 10 ай бұрын
After you complete your react full course, you should do an SFML full course
@Aryan-de9jw
@Aryan-de9jw 10 ай бұрын
I would really love to see that. 😊
@Aryan-de9jw
@Aryan-de9jw 10 ай бұрын
oh! and maybe a graphics programming tutorial as well.
@fieryscorpion
@fieryscorpion 10 ай бұрын
What is SFML?
@KingOfMadnesss
@KingOfMadnesss 10 ай бұрын
@@fieryscorpion A C++ library. You can build 2D and 3D softwares using it. With just C++, you can only build console applications
@angtran4119
@angtran4119 10 ай бұрын
oh thank you so much
@yukicheniwla
@yukicheniwla 10 ай бұрын
please explain for us laravel, ur the best bro, me and my friends we're learning a lot from u thanks for help us , from morocco
@Nurhussein2023
@Nurhussein2023 10 ай бұрын
great
@KristiKoroveshi-i9s
@KristiKoroveshi-i9s 10 ай бұрын
How did you make the css work without importing it on the jsx ?
@otabekmadaminov-z2i
@otabekmadaminov-z2i 2 ай бұрын
Thank you bro
@mk-vg1mx
@mk-vg1mx 3 ай бұрын
thanks a lot
@andromilk2634
@andromilk2634 9 ай бұрын
Is there a reason you started hours with "let" but for the other units of time you used "const" instead?
@tharinduminiruwan7842
@tharinduminiruwan7842 10 ай бұрын
@AbhayRajKarun
@AbhayRajKarun 10 ай бұрын
I am surprised it's at 100 views even after 26 minutes Crazy !
@diamondemerald6271
@diamondemerald6271 10 ай бұрын
Pls do a cmd course
@millad90s
@millad90s 8 ай бұрын
could you please share the code in github or ... ? thank you
@_amonimus_
@_amonimus_ 10 ай бұрын
how many programing languages do you know
@hydrogennetwork
@hydrogennetwork 10 ай бұрын
can you teach java spring please?
@chorkaniitv3386
@chorkaniitv3386 10 ай бұрын
Make android studio with java plz ..? I can't wait
@rawa97775
@rawa97775 10 ай бұрын
Please tutorial for discord bot for python please bro❤
@diamondemerald6271
@diamondemerald6271 10 ай бұрын
Next full course is CMD
@stylosuf1394
@stylosuf1394 10 ай бұрын
Python flet please 2024....
@hollycow8171
@hollycow8171 10 ай бұрын
return (number < 10 ? "0" : "") + number; CAN YOU ALSO REPLACE IT WITH return (number < 10 ? `0${number}` : number);
@vigneshsainallamothu4117
@vigneshsainallamothu4117 10 ай бұрын
bro code for main.jsx file
React useContext() hook introduction 🧗‍♂️
11:37
Bro Code
Рет қаралды 38 М.
Build a Stopwatch using React in 20 minutes! ⏱
20:01
Bro Code
Рет қаралды 40 М.
SIZE DOESN’T MATTER @benjaminjiujitsu
00:46
Natan por Aí
Рет қаралды 4,7 МЛН
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
Why no RONALDO?! 🤔⚽️
00:28
Celine Dept
Рет қаралды 90 МЛН
Build this JS Digital Clock in 10 minutes! 🕐
10:48
Bro Code
Рет қаралды 12 М.
How to render LISTS in React 📃
26:40
Bro Code
Рет қаралды 38 М.
React Query Full Course (With Common Patterns & Best Practices)
32:42
Youssef Benlemlih
Рет қаралды 4,1 М.
Combining Zustand with React Query
20:24
Cosden Solutions
Рет қаралды 27 М.
React useEffect() hook introduction 🌟
19:52
Bro Code
Рет қаралды 32 М.
Why Signals Are Better Than React Hooks
16:30
Web Dev Simplified
Рет қаралды 489 М.
Build this React To-Do List app in 20 minutes! ☝
22:35
Bro Code
Рет қаралды 70 М.
Learn CSS BOX MODEL - With Real World Examples
17:45
Slaying The Dragon
Рет қаралды 144 М.
I built the same app 10 times // Which JS Framework is best?
21:58
Fireship
Рет қаралды 2,6 МЛН
All useEffect Mistakes Every Junior React Developer Makes
22:23
SIZE DOESN’T MATTER @benjaminjiujitsu
00:46
Natan por Aí
Рет қаралды 4,7 МЛН