Submitted 11 months ago
Age calculator for React, styled-components, Vitest practice
@pbryan9
Design comparison
SolutionDesign
Solution retrospective
I probably overlooked a simpler approach, but I found calculating the age surprisingly tricky. I used it as an opportunity to familiarize myself with test-driven development (just for the logic part -- not so much on the rendered output). It was good fun, but I can't help feeling there's a better solution.
(PS I know I didn't implement the leap year edge case...hopefully there aren't any other holes in it though!)
Community feedback
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