This is a solution to the Interactive rating component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Note: Delete this note and update the table of contents based on what sections you keep.
Users should be able to:
- View the optimal layout for the app depending on their device's screen size
- See hover states for all interactive elements on the page
- Select and submit a number rating
- See the "Thank you" card state after submitting a rating
- Solution URL: Github Repo
- Live Site URL: Live Site
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- Mobile-first workflow
- Ai Prompting
- React - JS library
- Vite - An efficient alternative to
create-react-app
for building React projects.
I decided to write this project in React.js. It wasn't an easy process but I saw myself going back to refresh on the fundamentals of css, js and new stuffs like react states and props.
Going forward, my focus areas will be react props and states. I need to have a consolidated understanding of how they work and how they affect the whole scope of a feature in building. Learning that props in react could be used with the spread operator ...props
almost made me go lazy with wanting to use it in all my props instances but discovering that it wasn't good practice put me in check.
I also came across modern css selectors like :has()
and nesting
. These too, will have my focus shifted to them in future projects.
-
React.dev - This helped me a great deal with implementing the overall project in react. I got a good laugh when I learned that default components in react can be imported into other components with very unrelated names like
import { banana } from 'utils.js'
provided that "banana" in the utils.js file is exported as a default app. (lol) -
w3Schools - I found hardcoding the ratings from 1 to 5 quite unnecessary, so I needed to know how to tell the program to do that for me with few instructions which led me to practising this.
-
www.freecodecamp.org - My css became buggy along the line and this article from freecodecamp gave me some insight into crushing bugs the box-sizing way.
- Website - Divine Okafor-udah
- Frontend Mentor - @deeokafor
- Twitter - @deeokafor
- Thank you AlexKMarshall, your suggestion to someone on deploying React apps on Vercel or Netlify rather than github pages helped. For some reason, I can't seem to find the particular post where you made the suggestion... didn't pin it.
- Copilot
- Chrome Dev Tools Ai
- Bing