score:0

import ReactDataSheet from 'react-datasheet';
import React, { useState } from "react"; 

export default function DataSheetExample() {

    let tableContent= [
        [   
            {
                value:  "Something I want to style", 
                className : "my-style"
            },
            {
                value:  "Something else that I will style",
                className : "my-style"
            }
        ],
        [{value:  5}, {value:  5}]
        ]

    const [dataSheetGrid, setDataSheetGrid] = useState(tableContent);

    return (
        <ReactDataSheet
            data={tableContent}
            valueRenderer={cell => cell.value}
            onCellsChanged={changes => {
                const grid = dataSheetGrid.map(row => [...row]);
                changes.forEach(({ cell, row, col, value }) => {
                    grid[row][col] = { ...grid[row][col], value };
                });
                setDataSheetGrid(grid)
            }}
        />
    );
  }


Related Query

More Query from same tag