Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 3 years ago

React, SASS, used useContext hook to pass props

accessibility, react, sass/scss
Ayodele Arogundade•170
@Ayodelearog
A solution to the Interactive rating component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I would like anyone that can explain to me or point me to a resource that can help me fully understand Interfaces in TypeScript. I'm new to React and TypeScript and I tried to pass state as props to one of my child component, but it didn't work because I was unable to define the type of the "setState" function. I eventually had to use type "any" and that defeats the purpose of using TyeScript in the first place. I'd also appreciate comments on my tagNames.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Ayodele Arogundade's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License