Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 6 months ago

Interactive comments on with React hooks

react
Nico Velasco•410
@Darionvr
A solution to the Interactive comments section challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

Proud of how I was able to use different states to store temporary data like comments and replies before publishing them, and to avoid errors.

What challenges did you encounter, and how did you overcome them?

Being able to complete the logic behind editing and adding replies was the most challenging part due to the way they were nested within each other. I managed it by adding up to three parameters to the functions to identify the different IDs of both the comment and the reply, and by activating states to show or hide the forms.

What specific areas of your project would you like help with?

"Any feedback is welcome! I tried to create as many components as possible to reuse them separately and make the main code cleaner. I'm not sure if the comments should be ordered based on their score.

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 Nico Velasco'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

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