Loading

Quipoin Menu

Learn • Practice • Grow

react / useCallback for Performance
mcq
Direction: Choose the correct option

Q1.

How does useCallback improve performance?
A. By memoizing functions so they don't get recreated on each render, preventing child re-renders
B. By memoizing values
C. By optimizing component updates
D. By reducing bundle size
Direction: Choose the correct option

Q2.

When is useCallback most useful?
A. Never
B. Always
C. When defining event handlers
D. When passing callbacks to optimized child components (like React.memo)
Direction: Choose the correct option

Q3.

What does useCallback return?
A. A new function each time
B. The original function
C. A ref
D. A memoized version of the callback that only changes if dependencies change
Direction: Choose the correct option

Q4.

Without useCallback, what happens to a function defined inside a component?
A. A new function is created on every render
B. The function is reused
C. It causes an error
D. It is memoized automatically
Direction: Choose the correct option

Q5.

Is it necessary to wrap every function in useCallback?
A. No, only when needed for performance optimization
B. Only for event handlers
C. Only in class components
D. Yes, always