Interacting rating component with Basic JavaScript

Solution retrospective
I find really difficult to make the "Get back" button and i actually couldn't make it, it break my head. I really need to get better at javascript, its my first project with it and i need to improve. I would appreciate a feedback about good practices of my code, thanks.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Wandole
Hey!
As a user, I would like to actually see the choice I made when I click on a number. You should give a different style to the button when it's clicked. Talking about the button, in your code there is a list of choices (from 1 to 5): from an HTML point of view it's look a lot like radio inputs! You should try to use that instead of multiple buttons. It will also help you for the style of the selected value! You will need to make some search to understand how to style radio inputs but it's worth it because you will use it A LOT in your next projects.
The style in general looks very good! Maybe try to center better text in buttons? You should try to use Flexbox for that for example.
And for all your project, avoid using a fixed width (% is okay though but don't fit in all the situations) because you will have overflow issues with that on small screen sizes! It's not an issue in that project though :) Instead, use max-width as soon as you can! Same for height => use min-height.
Sometime fixed size is mandatory, but when it's not, don't use them, it will save you a lot of time!
I hope it help!
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