I build this solution with React and React Router, bundling with Vite because Vite offers faster build times, a better development experience, smaller bundle sizes, easier configuration.
This solution is not perfect, there are several bugs that when we search a gibberish country it's still give us some result 😕. I'll be very thankful if one of you guys want to help me fix this bugs.
There are a lot of new things I'd learned throughout this challenge.
Floating labels
Dom Manipulation
Form validation
Form Data Process
Passing a function as an argument
Refactoring code.
In this case, when I clicked the submit button and all inputs are empty, I wanted the first error message to appear are "First Name is required", instead of "First Name at least 5 characters".
So I remember we can pass a function as an argument, right? Then I create another statement inside a checkRequired() then pass a checkLenght() and checkEmail() as an argument, and it works as I wanted.
My question is, can you guys explain why it is working? I really didn't know what I'm doing I just intuitively pass that function into an else if statement but I really don't understand how it works.
Your feedback will be really appreciated guys.Thanks.
Mobile-first work flow using Sass, flexbox, CSS Grid and little bit of JavaScript for the Hamburger menu. any kind of feedback are lovely welcome . . .