Assignment: Build a multi-step form using React and XState.
● User Information: The user should input their name and email.
● Survey: A basic survey with multiple-choice questions.
● Confirmation: A confirmation page that shows the user's input and allows them to confirm
for submission or go back to previous steps and make changes.
● React: You should build this form as a single-page application using React and Next.js 13.
● XState: You should manage the form's state using XState. The state machine should
handle moving between steps, storing and updating form data.
● Validation: The form should have validation on the input fields. For example, if a user does
not input their name or email, or if the email is not in a valid format, the form should display
an error message.
● Styling: The form should be styled using CSS. The look and feel of the form is up to you.
● Testing: Write tests for the different states and transitions of the form.