Submitted
Responsive contact form in React
- HTML
- CSS
- JS
What are you most proud of, and what would you do differently next time?
This is my first attempt at a React form which has thrown up some challenges - I can see why devs don't like to use React for forms.
What challenges did you encounter, and how did you overcome them?
Validating the form data - especially email addresses - was a challenge. This was especially evident in trying to conditionally render errors and ensuring that errors were only flagged on the second render but would then vanish after correct info was entered. useRef(), has() in CSS and the + selector in CSS were invaluable in getting this right - along with some trial and error!