Optimize row updates for performance
mainWhen updating rows in your state, avoid creating new references for every row object. Instead, map through the existing rows and only create a new object for the row that actually changed. This allows the grid's internal memoization to skip re-rendering unchanged rows.
// ✅ Good: Only changed row is re-rendered
setRows(rows.map((row, idx) => (idx === targetIdx ? { ...row, updated: true } : row)));
// ❌ Avoid: Creates new references for all rows, causing all visible rows to re-render
setRows(rows.map((row) => ({ ...row })));