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

Contact Form Component using React, TypeScript and TailwindCSS

react, tailwind-css, typescript, accessibility
RamssC•520
@RamssCR
A solution to the Contact form 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?

Something I'm very proud of is being able to create the form logic with TypeScript using a custom hook typing its entry values and errors.

Of course, as it is my first TypeScript project, things aren't gonna be perfect the first time, so, feel free to share tips or suggestions to improve my code!

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

The fact that this is my first project with TypeScript was indeed, the actual challenge, since I understand not everything has to be typed since TS can infer when it comes down to primitive data types. If I had to list specific challenges, I'd have to say:

  • Centralizing types that might be reused in most components
  • Typing complex functionality (useForm.tsx, for example)
  • Typing complex reusable components
What specific areas of your project would you like help with?

As I mentioned, previously, neither my React, TailwindCSS or TypeScript code aren't perfect at all, so any suggestions and tips are well received.

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 RamssC'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