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

Tip calculator built with Vue and Tailwindcss

@ArthurWiliams

Desktop design screenshot for the Tip calculator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


The solution is finally done after what feels like an eternity.

The most difficult thing for me was validating the fields and displaying proper errors. The way I went about it was to define a prop that is a function and it would return either a string if there was an error or null otherwise.

If it's an error the field UI would reflect that error while at the same time the field component would emit that error to the parent so that other components would reflect that error as well. Because of this I have to define a validation function for every field each with there own validation logic.

I can't help but feel like the way I'm structuring things is wrong.

If you have a way to structure the validating code or simply an advice please do leave some feedback.

Thanks.

Community feedback

@MundiaNderi

Posted

Looks super neat and close to the design.

0

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