We would appreciate if you spend some time to review this code sample, imagine that this is a Pull Request from one of your colleagues.
The task is to implement a simple Login form component with React. Keep in mind that this is pseudo-code and there are some deliberate simplifications (such as ugly UI and stupid email validation).
Component is required:
- to have login and password fields
- to have onSubmit callback property, which is invoked when user submits the form (
({email:string, password: string}) => Promise<void>) - not to send empty or duplicating requests
- not to freeze
That's just simple auth form, I'm sure you have implemented it before ๐
We would like you to check if it matches functional requirements and how poor design and implementation are ๐
I would be happy to disscuss your feedback on interview,
Good luck!