CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/frontend-state-management

Proactively choose the right state management pattern: derived state, URL state, server state, local state, lifted state, Context, or external store. Always apply without being asked.

84

1.16x
Quality

76%

Does it follow best practices?

Impact

97%

1.16x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

task.mdevals/scenario-2/

Multi-Step Registration Wizard

Build a multi-step registration form in React with TypeScript. The form collects user information across 4 steps, then shows a summary for confirmation before submitting.

Step 1 -- Personal Info:

  • First name, last name, date of birth, gender (dropdown)

Step 2 -- Contact Info:

  • Email address, phone number, street address, city, state, zip code

Step 3 -- Account Setup:

  • Username, password, confirm password, preferred language (dropdown), email notification preference (checkbox)

Step 4 -- Professional Info:

  • Job title, company name, industry (dropdown), years of experience, bio (textarea)

Step 5 -- Review & Submit:

  • Display a read-only summary of all entered data grouped by step
  • A "Submit" button that sends a POST to /api/register
  • While submitting, the button should be disabled and show a loading state
  • On success, show a confirmation message
  • On failure, show the error and let the user retry

Navigation:

  • "Back" and "Next" buttons to navigate between steps
  • A progress indicator showing which step the user is on
  • The "Next" button should be disabled if the current step has validation errors
  • Validation: required fields must not be empty, email must contain @, password must be 8+ characters and match confirm password, zip must be 5 digits

Output

Produce TypeScript/TSX files in a src/ directory:

  • src/types.ts -- TypeScript type definitions
  • src/components/RegistrationWizard.tsx -- the main wizard component managing steps
  • src/components/StepPersonalInfo.tsx -- step 1 form
  • src/components/StepContactInfo.tsx -- step 2 form
  • src/components/StepAccountSetup.tsx -- step 3 form
  • src/components/StepProfessionalInfo.tsx -- step 4 form
  • src/components/ReviewStep.tsx -- step 5 summary and submit
  • src/components/ProgressBar.tsx -- the step progress indicator
  • src/App.tsx -- the app entry point

The code does not need to run against a real server. Do not include test files or build configuration.

evals

tile.json