Interactive rating component SASS and EDA

Solution retrospective
This time, I focused on organizing my app’s logic and exploring new architectural approaches. I found two suitable solutions for a small project like this: Module Architecture using IIFE and Event-Driven Architecture (EDA) with an Event Bus, utilizing Publishers and Subscribers. Since IIFE is somewhat outdated, I chose EDA.
I had already worked with event handlers in my previous project, Tips Calculator, and wanted to deepen my understanding by applying them again.
In this project, I built a component that validates whether the user has selected a rating and displays an error message accordingly. After submitting a rating, I also implemented a return function that allows users to go back to the rating form. This feature is, of course, purely for practice within this project.
What challenges did you encounter, and how did you overcome them?When it came to CSS, one of the challenges was styling the selected rating button—specifically, setting its background and creating the "glowing shadow" effect around the star.
In JavaScript, the tricky part was figuring out how to properly validate the radio inputs and reset the UI to its default state after "rerouting" back to the submission form.
Please log in to post a comment
Log in with GitHubCommunity feedback
- P@Coder-Liz
Great job, the layout looks really good.
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