Responsive newsletter signup form with React & Tailwind css 4 & Vite

Solution retrospective
I’m proud that I saw this one through from start to finish, including form validation, conditional rendering, and even deploying it! It was also my first time using Tailwind CSS 4, and honestly… I fell in love with it 😍. I’ll definitely keep using it in future projects to deepen my understanding and explore more of its features.
Next time, I think I’d try to build the layout mobile-first and also clean up my logic flow a bit earlier, especially around how I manage and reset state across components. But overall, it was a great learning experience.
What challenges did you encounter, and how did you overcome them?A few things tripped me up:
-
I had to really think through how to manage shared state between the form and the success message.
-
I struggled a bit with understanding how conditional rendering works in React (like switching between components based on state).
-
Also made some small logic errors with the email validation, which I fixed using regex (after lots of trial and error 😅).
I got through it by breaking things into small pieces and asking myself what each part of the code was doing. Writing things out and testing step-by-step really helped.
What specific areas of your project would you like help with?I’d love feedback on:
-
My validation logic especially the way I used regex for the email. Are there better ways to structure that?
-
How I handled shared state between the
NewsletterCardandSuccessCarddoes it make sense the way I passed props back and forth? -
Also open to any Tailwind 4 tips! I’m new to it and would love advice on how to keep utility classes clean and scalable as the project grows.
Please log in to post a comment
Log in with GitHubCommunity feedback
No feedback yet. Be the first to give feedback on Maz’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