Frontendx
README.md
SOLUTION.md
main.tsxentry
App.tsx
App.css
index.html
vite.config.ts
Installed
react@^19.2.0
react-dom@^19.2.0

Contact Form

Description

Construct a form component with fields for name, email, and message. The form should validate inputs and submit data to a backend endpoint when the user clicks submit.

Example 1:

Fill name, email, message fields => Click Submit => Data sent to API

Constraints

  • Email must be valid format
  • All fields required before submission
  • Show loading state during submission
Use useState to track step (0=email
Test Results

Contact Form

Replicate Google's two-step login UX in React. Step 1 collects and validates the email address. Step 2 collects the password. Conditionally render the Email component or the Password component based on the current step tracked in state. Validate the current step before advancing. Each step is a separate React component.