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 App Using React and SCSS!

P

@AdamHaniff

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


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

• This was my second React project and I'm starting to really see the power of React. If I had made this project with vanilla JS, there would be so much more lines of code. I like the state management system and being able to keep track of data that changes over time.

• This project looked really simple at first, but I underestimated it. There was so much logic that went into creating this app. I had to keep track of whether variables were strings or numbers and I had to make sure that strings were converted to numbers. I got a better understanding of how JS converts falsy values like an empty string to 0.

• I had to make sure the user wasn't able to put any characters other than numbers into the inputs. I set a limit for each of the inputs because I didn't want the user to enter in huge numbers and cause the UI to break. I set the bill limit to $10,000, the custom tip limit to 100%, and the number of people limit to 50. These limits should be large enough for the majority of realistic cases.

• From a styling stand point, I started using the clamp function a lot more to make my layouts more responsive. I should have been doing this way earlier in my coding journey. The clamp function allows me to write a lot less code in media queries.

• I learned so many new things from building this app and I definitely leveled up as a developer. Let me know what you guys think and I appreciate any feedback. Thanks!

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