PWC
PWC

Full Stack Developer

Debounced Search Component with Cancellation

Hard
Round 1codingCandidate Not Selected

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.

AI Powered

Share Your Story

Share your interview in your own words — our AI handles the rest. Hardly takes 2 minutes.

Mock Interviews & 1:1 Guidance

Practice mock interviews or book a 1:1 call for career guidance, resume reviews, and more.

AI Interview Prep

AI interview prep powered by real interview data.

Show Your Love!

Connect with us on social media