Hello
Currently, I am working on React Typescript Web App.
import { useRef, useEffect } from "react";
import { HotTable } from "@handsontable/react";
import Handsontable from "handsontable";
const hotSettings = {
data: Handsontable.helper.createSpreadsheetData(4, 4),
colHeaders: true,
height: "auto",
licenseKey: "non-commercial-and-evaluation",
};
export const About = () => {
const hotTableComponent = useRef(null);
const swapHotData = () => {
hotTableComponent.current.hotInstance.loadData([["new", "data"]]);
};
useEffect(() => {
hotTableComponent.current.hotInstance.loadData([["new", "data"]]);
}, []);
return (
<div className="controls">
<HotTable ref={hotTableComponent} settings={hotSettings} />
<br />
<button onClick={swapHotData}>Load new data!</button>
</div>
);
};
on there, I got the following error.
Regards