Age calculator app with React and Next.js

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.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Abel Muro's solution.
Join 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