Skip to content

Deeokafor/fm-interactive-rating-component

Repository files navigation

Frontend Mentor - Interactive rating component solution

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.

Table of contents

Note: Delete this note and update the table of contents based on what sections you keep.

Overview

The challenge

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

Screenshot

mobile screen - select rating card

mobile screen - thank you card

desktop screen - Select rating card

desktop screen - thank you card

hover states

Links

My process

Built with

  • 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.

What I learned

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.

Continued development

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.

Useful resources

  • 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.

Author

Acknowledgments

  • 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

About

This is a solution build to the Frontend Mentor's Interactive-Rating-Component build challenge.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published