Interactive Rating Component develop in React, HTML and CSS
Design comparison
Solution retrospective
Although this is a project that mainly we can develop in HTML and CSS, I developed it in React using two components (Request.jsx and Thank.you.jsx) and CSS for the styles. A lot of learning left this exercise:
- Conditional rendering to switch both components.
- Two state variables to manage the rating and a boolean variable to manage if the user rated or not.
- Active pseudo class in CSS to show as "selected" the rating.
- Props and onclick event to develop the functionality of this challenge.
- Media queries CSS to switch between mobile and desktop versions.
Feedbacks are welcome.
Community feedback
- @Michael-IllPosted over 1 year ago
I was looking for other solutions to this problem as I was getting stuck on some react fundamentals but I really liked the way you handled the component switching. The background color seems off as well as the submit button having a border but other than that it's very well done!
0@seismicmanPosted over 1 year agoThank you very much for your comment @Michael-Ill . it´s correct. Later, I´ll fix these details in the background color and submit button
1
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