Responsive and reactive Tip Calculator App in Vue.js

Solution retrospective
I am most proud of how I integrated Vue.js to create a dynamic and responsive user interface for the tip calculator. Using Vue.js allowed me to manage state and reactivity effectively, enabling real-time calculations based on user inputs. Additionally, achieving a clean and visually appealing design that enhances usability was a satisfying accomplishment.
Next time, I would focus more on accessibility considerations from the outset of the project. Ensuring the application is fully accessible to users with disabilities, including proper keyboard navigation, screen reader compatibility, and color contrast ratios, would improve its overall usability and inclusivity. Additionally, I would enhance error handling and validation messages to provide more intuitive feedback to users.
What challenges did you encounter, and how did you overcome them?Challenges Encountered: One challenge was implementing robust input validation, particularly ensuring that users couldn't enter negative numbers or invalid characters in the custom tip field (customTip). Managing the validation logic dynamically alongside Vue's reactivity posed initial difficulties.
Overcoming Challenges: To address these challenges, I utilized Vue's computed properties and watchers effectively. I created dedicated validation functions that were triggered reactively whenever customTip or other relevant inputs changed. This approach ensured that input validation was seamless and user-friendly, enhancing the overall reliability of the application.
Please log in to post a comment
Log in with GitHubCommunity feedback
- P@kaamiik
Hello, congratulations on completing this challenge. I have also managed to finish it. It’s impressive that you were able to accomplish this using a framework. I am currently learning React, but I haven’t yet started a project using it.
Upon reviewing your project, I noticed a few issues when viewing it on Firefox. The grid layout seems to be off, which I suspect might be a browser-related issue. Additionally, in the error state, when I enter a zero or a negative number, the outline of the input field should turn red to indicate an error. Furthermore, when changing a positive number to zero or to an error state, the reset button remains enabled. I believe it would be more intuitive if it were disabled in these cases.
Overall, this is a challenging task, especially on the JavaScript side, and I think you’ve done an excellent job. I’m sure my solution has its fair share of bugs as well. Keep up the good work and continue learning and improving! 😊
Marked as helpful
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