Main Navigation
Share your interview in your own words — our AI handles the rest. Hardly takes 2 minutes.
Practice mock interviews or book a 1:1 call for career guidance, resume reviews, and more.
Connect with us on social media
Interview experiences & questions tagged Hooks
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.
Explain the differences between: - `useMemo` vs `useCallback` - `useState` vs `useEffect`
Explain what React hooks are and why they are used.
Create a custom React hook that synchronizes a state value with localStorage. The hook should: - Read the initial value from localStorage - Keep React state and localStorage in sync - Return the current value and a setter function - Handle changes to the storage key correctly.
Implement a custom `useDebounce` hook from scratch for a React application.
Coming Soon