Question: In this assignment, you will build a login form in React that validates user input. The form will include a reset button to clear the
In this assignment, you will build a login form in React that validates user input. The form will include a reset button to clear the input fields and a submit button that checks if any fields are empty. If validation fails, a modal will appear, and if validation passes, the page ONLY shows HelloXXX XXX is the name of this user. This assignment is designed to reinforce your skills in using useRef, portals, useContext, and useReducer in React.
Requirement:
The UI and the layout are user friendly.
All the input boxes can update and work well.
The reset button could reset all the input box empty.
The error message modal works and only checks if the input is empty or not.
If login successfully, the page ONLY shows Hello XXXX XXXX is the name of the user input.
Add proper CSS style.
Create useRef, portals, useContext, and useReducer in your code.
Create your app in codesandbox. points Name
Email
Reset
Submit
Validation Error
All fields are required!
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
