Submitted almost 3 years agoA solution to the Tip calculator app challenge
Responsive tip app using Grid and StimulusJS
vite
@blndcat

Solution retrospective
Implemented using StimulusJS for the logic (calculation and validations) along with grid for the layout. Decided to move the position of the error messages so that they were more flexible and consistent.
Probably spent as much time trying to cover as many edge cases, as I did with implementing the layout and main calculation logic. Some examples:
- if the user clicks in the custom tip field and clicks out without entering a figure, it should result in an error
- accepting the custom tip with a percentage sign like 20%
- if an error occurs display dashes in the results panel so a user is protected from using potentially incorrect figures (e.g. if a negative custom tip value is entered)
and lots more! :)
Code
Loading...
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Ian's solution.
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