Build a table generator: two number inputs — rows and columns — and a table that fills with sequential numbers to match. Change either input and the grid redraws. The whole trick is a single mapping: the cell at row r, column c holds r * cols + c + 1, which turns a 2-D position into the running count 1, 2, 3, ….
// A self-contained component. No props.
function App(): JSX.Element;
Two controlled number inputs (rows, cols) and a <table> derived from them.
rows = 3, cols = 4 →
1 2 3 4
5 6 7 8
9 10 11 12
rows = 2, cols = 2 →
1 2
3 4
r * cols + c + 1.rows and cols and compute the cells on render.