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

Newsletter sign-up form made with React

@savvystrider

Desktop design screenshot for the Newsletter sign-up form with success message coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Good project to practice React, basic form validation, and mobile styling.

Community feedback

@daniel-barda

Posted

Good job 😊.

I recommend using guard clauses in case the user doesn't enter anything in the email input.

Guard Clause

  function handleSubmit(e) {
    e.preventDefault();
    if (!emailInput) return setIsValidEmail(false);
    setShowSuccessModal(true);
  }

Marked as helpful

1

@savvystrider

Posted

@daniel-barda Thank you!

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