Full Stack Developer
Debounced Search Component with Cancellation
Build a controlled React search component with the following requirements: - Bind a text input to React state. - Wait 400ms after the user stops typing before making a `GET /api/employees?q=term` call. - If the trimmed query length is less than 2 characters, do not call the API; clear results and display "Type at least 2 characters". - While the request is pending, display "Searching…". - If the user types again before the previous request finishes, ignore or abort the previous request using `AbortController` to avoid race conditions. - Display a user-friendly error message on failure. - Implement using React hooks only.
This question was asked in
PWC Full Stack Developer Interview Experience
This interview experience covers a technical round at PwC for a full-stack role specializing in .NET and React. The 1-hour virtual interview tested a comprehensive mix of backend fundamentals, database architecture, coding, and modern React concepts. Overall, the interview had a medium difficulty level with a strong focus on practical implementation, API design, and component state management.