Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Interactive Rating Component using React JS

@lazy4gyan

Desktop design screenshot for the Interactive rating component coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


Hi everyone!

This is my first React based challenge. I have tried my best to complete this challenge as per my knowledge, if you think this could be done better then please do not hesitate to reply, I will take care of all the suggestions and try to implement in my future projects.

Happy Coding😊

Community feedback

David 8,000

@DavidMorgade

Posted

Hello Madan Shina congrats on finishing the challenge!

Your component seems to work perfectly and adjust correctly to the UI, let me give you some advices for React that maybe can help you in the future. Some of this advices are bit of an overkill for a little application like this one, but practicing them can help you a lot when building bigger React Apps.

  1. Instead of having all your code on Rating.js, try building each component apart and then rendering in your main component, this will make your code more readable and structured, instead of having a big chunk file with all the JSX inside!

  2. Don't use globals style to style every component like in a normal html, css, javascript project, try using either CSS modules or Styled Components, you can learn more of them clicking on the links, my preferred option is styled components since they are easy to pass props, change styles, reuse them, but CSS modules are also a great approach (you can use them with SCSS too)

  3. You don't need to import React from 'react', this was added like 1 or 2 years ago, there is no longer the need to do it!, you can just import parts of react like import {useState} from 'react' and so on!

Hope my feedback helps you in future challenges, don't hesitate to ask any question, good job!

Marked as helpful

2

@lazy4gyan

Posted

@DavidMorgade Thank you for valuable feedback, I will implement this in future challenges.

1

Please log in to post a comment

Log in with GitHub
Discord logo

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