Selecting the tip rate. The core challenge.

Solution retrospective
Method for selecting the tip rate, with useState and onClick action.
What challenges did you encounter, and how did you overcome them?Entering data into a type="number" input field can be uncomfortable in a mobile phone, due to lack of delete key.
To make it more user friendly, the initial value is set to empty string "", even when it's a type="number". That way, the placeholder shows up, and the cursor goes far right when on focus.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Guillermo Dominguez'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