DEV Community

Ankit Kumar Gupta
Ankit Kumar Gupta

Posted on

Digital Clock in React

This is my first post. So please forgive me in advance.

I never wrote anything before. Even in collage I copied and pasted assignments. So I'm trying to post a blog in a week.

This post is a part of my #100daysofcode challenge. This is my second attempt. My first attempt last long for 10 days. I took this challenge to learn a new thing everyday. I will be focused on JavaScript, React and NodeJs.

On day 1 of this challenge I build a React Application that shows current time. I know this is not much but I will try to make it harder.

You can check out source code here.
https://github.com/ChikoDish/react-clock

live demo: https://chikodish.github.io/react-clock/

Please leave you valuable comments.
Thank you.

Top comments (8)

Collapse
 
dcwither profile image
Devin Witherspoon •

Thanks for sharing! Looking at your code it seems your time updates every second, but not on the second. I actually wrote a react hook that tries to run the timeout right when the second changes if you’d like to see how that works.

Keep it up 🙂

Collapse
 
chikodish profile image
Ankit Kumar Gupta •

Thank you for taking time to review and sharing such useful advise. I'll definitely update my code.
Thank you.

Collapse
 
valeriavg profile image
Valeria •

Nicely done, looks really stylish:-)
I have an idea on how to make it harder!
Try making a flip clock:
Flip Clock Example

Collapse
 
chikodish profile image
Ankit Kumar Gupta •

Thank you. I'm very bad in styling but I'll try.

Collapse
 
saeidamini profile image
Saeid Amini •

Nice job Ankit Kumar, never give up ✌️😉

Collapse
 
chikodish profile image
Ankit Kumar Gupta •

Thank you 😊

Collapse
 
galelmalah profile image
Gal Elmalah •

Nice! Keep at it!

Collapse
 
chikodish profile image
Ankit Kumar Gupta •

Thank you.