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 page with React and Typescript

#react#typescript

@kofinartey

Desktop design screenshot for the Interactive comments section coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
3intermediate
View challenge

Design comparison


SolutionDesign

Community feedback

Travolgi 🍕 31,480

@denielden

Posted

Hey Kofi, congratulations on completing the challenge! You did a great job 😉

Let me give you some little tips for optimizing your code:

  • add main tag and wrap the content of page for improve the Accessibility
  • add descriptive text in the alt attribute of the images
  • remove all unnecessary code, the less you write the better as well as being clearer: for example the div container without class
  • use react Fragment instead of a unnecessary div for the return of component read here. This way you don't add unnecessary additional nodes to the DOM:
const ComponentWithOutFragment = () => {
  return (
     <div>
        {more content and child}
     <div>
  );
}

const ComponentWithFragment = () => {
  return (
     <>
        {more content and child}
     <>
  );
}
  • if I click on the upvote button I can increase it to infinity and not just by 1 point. add a control
  • i can comment also with empty comment or with blanks, add a control... The trim() method can help you -> read here

Hope this help! Happy coding 😁

Marked as helpful

2

@kofinartey

Posted

@denielden Glad you could make time to go through this project. I appreciate your input and will do well to implement the enhancements

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