Tip Calculator App - Vite App
Design comparison
Solution retrospective
Hi, any advice you can give me to keep improving.
Community feedback
- @Mazz100Posted 9 months ago
Hey. I just finished mine and would like to give a few suggestions.
-
Firstly just like @Dimitar mentioned you need to display an error text like it's in reference and I achieved that with conditional rendering.
-
For me I wanted to cap the digits because it makes no sense to insert hundreds of them so a simple
bill.length
can do the trick and then set it back to empty strings. -
Lastly if you want you could make a condition so the results doesn't render unless both bill and people are not 0.
Marked as helpful0 -
- @mitkokazakovPosted 9 months ago
You should check if the number of people is 0 or less and display an error message above the input field. It could be done with oninput event which will be triggered every time when the user enter a number in the field.
Marked as helpful0
Please log in to post a comment
Log in with GitHubJoin 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