import { memo, useContext } from 'react'; import type { GridChildComponentProps } from 'react-window'; import styles from './MatrixVis.module.css'; import { SettingsContext } from './context'; function Cell(props: GridChildComponentProps) { const { rowIndex, columnIndex, style } = props; const { rowHeaderCellsWidth, cellSize, cellFormatter } = useContext(SettingsContext); return (
{cellFormatter(rowIndex, columnIndex)}
); } export default memo(Cell);