Tip Calculator App (ReactJS + Tailwind CSS)
Design comparison
Solution retrospective
Hello everybody π. Iβm Fabrizio and this is my solution for this challenge. π
π οΈ Built With:
- React JS. βοΈ
- TailwindCSS. π¨
Any ideas for enhancing and minimizing unnecessary code are appreciated!
Thank you. πβοΈ
Community feedback
- @Nickil13Posted about 1 year ago
Hey Fabrizio!
Great job on the challenge. Some tips:
1.Tailwind has its own scaling system. I would recommend using that when you can instead of using arbitrary values. This would make it more legible for others reading your code.
Understandably you are aiming to match the design so Tailwind paddings/font sizes won't line up for you in all cases.
An alternative would be seeing if these values already exist in Tailwind or defining these values in the theme of your Tailwind config to be reused and easier to read in your code. Ex. instead of
text-[.875rem]
you can usetext-sm
(which is the Tailwind equivalent).2.Take advantage of using react & having components. You could use a component for the tip percentage buttons or just map through a list of predefined values.
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin 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