Design comparison
Solution retrospective
I am most proud of using React to implement the form in the project. I feel like my skills in React have gotten so much better. Of course, I am always looking for ways to improve, but I'm so confident that I should be able to pass most React interview questions. That is, if my anxiety doesn't get in the way.
What challenges did you encounter, and how did you overcome them?The only challenge that I encountered was deciding which method to use to implement the error state in the form.
One method is using an error state const [error, setError] = useState(false)
and applying inline styles to the input when the error state is changed to true
Another method is using the ::user-invalid
pseudo element to apply the error styles to the input when there is an invalid value.
I decided to apply the error state with useState(false)
, because there were certain scenarios where the ::user-invalid
was not applying the error styles to the input
Any criticism is welcomed! If you think I'm overcomplicating things, then please let me know!
Community feedback
Please log in to post a comment
Log in with GitHubJoin 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