Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 year ago

Newsletter-Signup using > React-Tailwind CSS-React Router-SPA-Vite

react, react-router, vite, tailwind-css
Basant Soni•450
@SoniBasant
A solution to the Newsletter sign-up form with success message 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?
  • Project Name: Newsletter signup with success message
  • Tech Stack: React, React Router, Tailwind, Vite
  • Concepts: Functional components, states and props, SPA(Single Page Application), session storage, client-side rendering and more.

This is my first React project. 😀

Read official documentation more. Add projects for component life-cycle, RESTful API and Redux.

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

It was supposed to be a basic React App. At least this is what I was thinking. 🙃

First CRA (Create React App) got deprecated. To start React project there are lots of videos and articles around CRA, but no use. 😐

I found about Vite and so first I install Vite globally and then install React in my project. 🏃‍♂‍

For style, I install Tailwind. Again, it takes lots of internet searching to correctly add font files and images in my react project. 🐌

I was able to make component based static layout. The React tutorial is really great. I just follow it and successfully add states and props. After clicking button, for empty input and invalid Email it shows error message and no message for valid Email. 👏

Here comes my biggest hurdle. I need to show a Thank You message page on valid Email. After some searching, I found out about React Router and SPA(Single Page Application). It took time to know what are these and how to implement them. I didn't find any video or article which fully shows what I need to do. 🙁

At last I decided to read official React Router documentation, which was so boring initially, but turned out to be quite helpful. 🙏

I was able to code what I wanted and made a Thank you message page which also show the Email you type in first page. Maybe there is another way to do this in React but I use sessionStorage to bring Email into Thank You page. Just wanted to deploy my project. 🙌 🏃‍♂‍

And I made my first React app. I upload it in my Frontend Mentor Project repository. And in live link, I got a perfectly white screen. Boom. ✨✨✨

I did not know what happened. Checked every file. 😵

When I searched about it, I got lots of not-so-easy ways to deploy React project in GitHub pages. It is not remotely as same as Vanilla JS projects. I followed many methods one after another. Upload and delete project in GitHub couple of times. It just didn't work. 😕

Finally I choose Netlify instead of Git Pages. I create account, upload project by drag-n-drop and project deployed. That's it. You can also change name of project in URL. I am endorsing Netlify for React projects, without getting any money. Time, efforts and peace of mind are also important. 😇

Though GitHub is not that bad. You can add React project in GitHub and export it from Netlify. This way it is easy to maintain different versions. 🙂

Give your reviews and Likes. Thanks for reading. 🙏

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

One question> Can I keep many React projects in one repository and deploy them separately? (I read in internet while searching about it that it is possible. Don't know how. But with a big drawback that every project in that repository will be deployed again if one project changed. Is it correct?)

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 Basant Soni'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
Frontend Mentor logo

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

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit 1st-party linked stylesheets, and styles within <style> tags.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.