Design comparison
Solution retrospective
This was a tricky app to make. Especially with figuring out the proper algorithm required to convert the user's birthday into an age. The app is fully responsive and even has an animation that occurs when the user clicks on the submit button. I used a setInterval() that calls the setState() function every 30 milliseconds. Inside the setState(), it will continue to increment the state by 1 until it reaches the age of the user in months, years, or days. This is what creates the animation of the numbers in my app.
Community feedback
- @OlatoyanPosted over 1 year ago
Nice Job. Although, I noticed you didn't really account for a leap year. so when I tried inputting a day in the leap year, e.g 29/04/2004, I got an error. But I love the animations. Nice job
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord