Design comparison
Solution retrospective
Hello Frontend Community! I believe that I've completed all the essential parts of the challenge. However, when incorrect input data is submitted, and an error or errors are triggered, the input data gets cleared. According to the challenge's instructions (error handling slides), incorrect data should remain present in the input fields. I think the solution should not be that difficult, but I cannot see it. Of course, I will check the solutions here and probably find it pretty quickly, but I would still appreciate feedback. :)
Community feedback
- @OrkhanIsmayillPosted 9 months ago
Hello, I looked at your code. First of all, I can say that you have structured the JavaScript code very logically ). I recommend that you use the .jsx extension at the end of your files. This way, you can catch React errors more effectively.Good luck :)
Marked as helpful1 - @viniciuspmacedoPosted 9 months ago
Hello! In the "AgeInputForm" you can put a checking before you clean the inputs.
// Clear input values after successful submission if (setDayError === "" && setMonthError === "" && setYearError === "") { setDay(""); setMonth(""); setYear(""); }
Marked as helpful1
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