This question evaluates a developer's competence in React component design, state ownership (controlled vs. uncontrolled), dynamic column rendering, client-side pagination and sorting, component decomposition, responsiveness, extensibility, and performance debugging.

Context: You are building a reusable React Table component for a frontend technical screen. The table should accept dynamic column definitions, support client-side sorting and pagination, and be decomposed into clear subcomponents. You must also explain state ownership (local vs. parent) and controlled vs. uncontrolled props. After the base implementation, address extensibility, responsiveness, debugging, and performance.
columns
prop, with accessors and optional custom cell renderers.
Given an existing React table implementation, identify and fix:
Explain how to detect each (e.g., React DevTools Profiler) and the specific code changes you would make (memoization with React.memo/useMemo, stable callbacks with useCallback/useRef, correct keys, proper effect cleanup).
The table feels janky under heavy data. Provide a concrete optimization plan:
Login required