@MojtabaMosavi
Posted
1- In You js your repeating the same logic for prepanding zeros quite a few times which you should avoid, remember we as programmers always strive to not repeat ourself thus being DRY. You can define a resuable function like:
const prepandZero = (time) =>{ time < 10 ? `${0time}` : `${time}`}
2- In situations where it's possible to take implement something as a component you should always prioritize it because it create cohesive structure and save you from writing some line of css plue you can resue it in other projects. For instance the coutdown could be implemented as a component, take a look at my solution for more details https://www.frontendmentor.io/solutions/launchcountdowntimermain-RFKBZhKW9
Keep coding :=)
Marked as helpful
@cliffordjfedev
Posted
@MojtabaMosavi 1- You're right! I have to stop repeating myself, with a reusable function the code would be cleaner.
2- I saw your solution and your codes there is a huge difference, the truth is that I have to practice more to improve my skills and know when and how to create a clean component.
If you have any suggestions on how I can improve my skills feel free to tell me.
Thanks for your feedbacks!
@MojtabaMosavi
Posted
@cliffordjfedev Pick project --> Focus on learning new things and improving --> Practice Practice Practice And loop it until infinity.
@cliffordjfedev
Posted
@MojtabaMosavi Thanks! I'll do it.