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

Typescript practice :)

@Sam-Guliker

Desktop design screenshot for the Testimonials grid section coding challenge

This is a solution for...

  • HTML
  • CSS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Feedback is always welcome, what typescript best practices would you recomend?

Community feedback

T
Alex 2,010

@AlexKMarshall

Posted

Hey there

This looks good. Just be careful with your html. The heading elements that you've currently got in there aren't really headings. Headings should read like a table of contents and be understandable on their own.

As for typescript. You've got the right idea. Creating a Props type. Using ReactNode for children elements. Returning JSX.Element from a component. Those are all the building blocks of basic react typescript. There isn't much more you can do with Typescript in a project like this as it's just a static site with no interactivity. The real benefit of typescript will com when you start building apps.

I would say that while creating the container component is good practice for typing the props, in this case that component isn't really giving you any benefit and you may as well just inline that <main> element right in the app file.

Marked as helpful

1

@Sam-Guliker

Posted

@AlexKMarshall

Hi,

Thanks for the feedback, I'll keep the headings in mind for the next time. Probably just going to use different 'p' tags. The main part was just for practice, I know it's a bit to much for a project like this. I just wanted to get my feet wet with TS.

My next project is going to be bigger and using TS.

Once again thanks! :)

0
codezeloss 570

@codezeloss

Posted

This comment was deleted

0

@Sam-Guliker

Posted

@elosscode

Hi, Thanks! Have you checked the code or the error? Because it's wrapped in a main. The issue is that i'm not using a 'h1' tag.

1
codezeloss 570

@codezeloss

Posted

@Sam-Guliker Yeah, I'm so sorry.

0

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