This is my solution to the Tip calculator app challenge on Frontend Mentor.
User can input the bill total and the number of people paying along with selecting a tip amount.
The Tip Amount per Person and the Total per Person update with each input change.
If a zero is inputed to the bill or number of people input an error appears.
- Live Site URL: Splitter Tip App
- React - JS library
- Flexbox
- CSS Grid
- Mobile-first Workflow
I wanted to practice with the useReducer
hook. So all state runs through it instead of useState
The buttons for select tip are actually radio inputs. I found a way to style them to make them look like regular buttons.
- SoundCode - This helped me to style the radio inputs to appear as buttons.
- Web Dev Simplified - This video from Kyle was my inital guide to use reducer. Along with his Calculator App