Design comparison
SolutionDesign
Community feedback
- @YassineafailaPosted over 1 year ago
hi ,the desing looks good and the code also good but i have one suggestion lines of code : =>you could use the value attribute of the button like this : {[1, 2, 3, 4, 5].map((num) => ( <button className="btn" onClick={handleClick} key={num} value={num}> {num} </button> ))} =>which affect on this: const handleClick = (e) => { setRating(e.target.value); }; and also it will be better if you learn a framework like bootstrap 5 or tailwind
Marked as helpful0
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