Katkat

Implement a multi-step form in React

StripeSoftware Engineer · Onsite

Last updated

This question evaluates a candidate's competence in React front-end development, including component state management, multi-step form validation, UI state control during asynchronous submissions, and error handling.

Build a multi-step form component for the web. Steps: (

  1. collect basic user information; (
  2. collect address information; (
  3. review and confirm submission. Requirements: implement basic field validation; allow step navigation and switching; control disabled states appropriately; show a loading state on submit; and display error messaging on failed submissions. Use React. Be ready to discuss: why choose a reducer-based state management approach versus multiple useState hooks; how you would organize the component structure as the number of steps grows large; how to design error messages to balance good UX with clear logic; and what performance optimizations you would apply (e.g., memoization, lazy rendering).