Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Age Calculator Collab with Gagan Singh. React & TailwindCSS

P
Joe Kotvas 140

@joekotvas

Desktop design screenshot for the Age calculator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

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.

Community feedback

Please log in to post a comment

Log in with GitHub
Discord logo

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