Need suggestions to improve the code of 25 + 5 clock with Hooks

Hello folks,

So I am working on the 25 + 5 clock project with hooks system. I’ve learned hooks system two days ago and now I passed the content and timer tests. However, I think my code looks really ugly.

I really hates the way that I used useEffect method. Also I think I should organize components and divide the responsibilities in a better way.

Any suggestion would be appreciated, thank you!

Live demo: 30 Clock - CodeSandbox

Challenge: Build a 25 + 5 Clock

Link to the challenge:

Hi @purecodework !

I agree that the app.js and app1.js is a little confusing.
You should just have one app.js and the rest are child components.
For example, you might consider having a separate component for just the the timer and convert time functions.

You can play around with your code and see what make sense to extract out of the app.js and place in individual components.

Hope that helps!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.