HomeInterview QuestionsSuppose you need to display under 10,000 rows effi…

Suppose you need to display under 10,000 rows efficiently; what ways can you achieve this?

🟡 Medium Conceptual Junior level
1Times asked
Apr 2026Last seen
Apr 2026First seen

💡 Model Answer

Displaying up to 10,000 rows can be handled efficiently by combining several techniques. First, use pagination or infinite scrolling to load only a subset of rows at a time, reducing the DOM size. Second, apply list virtualization (react‑window, react‑virtualized) so that only the visible rows are rendered. Third, memoize row components with React.memo and use stable keys to avoid re‑renders. Fourth, use useCallback for event handlers and useMemo for derived data to keep references stable. Fifth, consider server‑side filtering and sorting to reduce the amount of data sent to the client. Finally, enable shouldComponentUpdate or React.PureComponent for class components. Together, these strategies keep rendering fast, memory usage low, and the UI responsive even with large datasets.

This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.

🎤 Get questions like this answered in real-time

Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers — invisible to screen sharing.

Get Assisting AI — Starts at ₹500