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

Responsive tip calculator using React

Nari Leeβ€’ 60

@eenaree

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


I made an input event handler for the tip counting, I would really appreciate any feedback on how it is. Thank you!

Community feedback

Nari Leeβ€’ 60

@eenaree

Posted

Thanks for your feedback! πŸ‘

This made me think about breaking up components into smaller units, and practiced that. The code was rewritten using a state management library called recoil as well.

However, in the case of number 3, the greater the number of people compared to the dollar, the more 0 is displayed, but I do not think it is right to indicate more decimal places.

I haven't figured out the exact answer to this yet, so I haven't fixed it.

0
Rayaneβ€’ 1,935

@RayaneBengaoui

Posted

μ•ˆλ…•ν•˜μ„Έμš” Nari Lee,

Congrats for completing this challenge ! πŸ™‚

I'd like to suggest :

  • Add some CSS transition to make your hover animations smoother. For example It could be something like transition : all 0.3s ease where "all" is the CSS property you want to animate. This article is great also to understand how and when to use ease effects (especially ease-in and ease-out) : https://css-tricks.com/ease-out-in-ease-in-out/

  • I would personally try to break down the Calculator component into smaller pieces to make it simpler to read. Here I can see multiple useEffect hooks, thus they could be separated into other components that only do only 1 thing.

  • It's great that you took the time to handle non authorized values such as 0 persons or 0 dollars, but to push it even further you could handle the situation when there are too many people compared to the bill amount. If I put 3$ with 1000 persons the tip amount and total are equal to 0.

Otherwise, well done for the challenge and it's also responsive, which is great !

Have a nice day ! 🌞

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