How would you optimize a high-frequency data grid in React.js to prevent unnecessary re-renders when rendering thousands of rows?