react-spreadsheet
react-spreadsheet copied to clipboard
I get the error with the code in the document
I'm new to react-spreadsheet.
To understand the library, I copy the code in the document. When I copy the code of Controlled Section in Usage, I get the following error.
You should update the document like this.
const [data, setData] = useState<Matrix<CellBase>>([
[{ value: "Vanilla" }, { value: "Chocolate" }, { value: "" }],
[{ value: "Strawberry" }, { value: "Cookies" }, { value: "" }],
]);
return <Spreadsheet data={data} onChange={setData} />;