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 React
Explain the purpose of useMemo(). When should it be used, and when can it actually hurt performance?
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.
What is React.memo()? Explain what problem it solves, how it works internally, and what the optional comparison function (isEqual) is used for. Also, explain the difference between React.memo() and useMemo().
Consider the following React component using useMemo. Why might useMemo not behave as expected in this example? Explain how useMemo works, what dependency arrays do, and when useMemo should or should not be used.
What are the different React performance optimization techniques you have employed in your projects? Share specific examples if possible.
Coming Soon