Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 1 year ago

Age Calculator Collab with Gagan Singh. React & TailwindCSS

react, tailwind-css, vite
P
Joe Kotvas•140
@joekotvas
A solution to the Age calculator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

It was great to do this project collaboratively with another developer, using VS Code Live Share and Port Forwarding. I enjoy working as a team, as I always learn something from everyone with whom I work.

I'm proud of the attention we gave to keyboard accessibility and responsive layout. I feel that this project is very well-polished.

One thing I would do differently is to pay a bit more attention to project structure from the get-go. Thinking about structure before we start would help avoid haphazard, post-hoc organization and help keep the code cleaner.

What challenges did you encounter, and how did you overcome them?

As noted in the challenge description, the date validation was particularly tricky. We used the date-fns function library for the core calculation, and found and extended this nice bit of code for getting the days in any particular month:

function getMaxDaysInMonth(month: number, year: number) {
  const date = new Date(year, month, 0);
  date.setFullYear(year);
  return date.getDate();
}

We ran into several bugs caused by stale state, and it was helpful and educational to work through those problems, keeping in mind the effect of closures.

What specific areas of your project would you like help with?

I'm really happy with this project! That said, feedback of any kind is very welcome, so if you spot room for improvement, please drop me a note.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Joe Kotvas'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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License