Responsive Tip Calculator using Next.Js

Solution retrospective
Successfully building a fully functional tip calculator using Next.js and JavaScript. This project helped me better understand how to manage user input, perform real-time calculations, and update the UI dynamically. I also focused on keeping the code organized and readable, which made it easier to debug and maintain.
What challenges did you encounter, and how did you overcome them?Handling user inputs correctly and ensuring that the calculations updated in real time. Initially, I had issues with the values not updating properly when the user changed the tip percentage or number of people.
To solve this, I revisited how state management works in React and ensured that each input field properly updated the component state. Once the state was correctly connected to the calculation logic, the results began updating instantly as expected.
What specific areas of your project would you like help with?I would appreciate feedback on improving the structure and scalability of my code. Specifically, I would like to know if my component organization and state management approach follow best practices for a Next.js application.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on John Eze’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