Posted 24 May 2022, 9:29 am EST
I’m trying using the spreadjs with Typescript and ReactJS, but ocurre this error:
‘SpreadSheets’ cannot be used as a JSX component.
Its instance type ‘SpreadSheets’ is not a valid JSX element.
The types returned by ‘render()’ are incompatible between these types.
Type ‘React.ReactNode’ is not assignable to type ‘import(“C:/Users/g.conceicao/Documents/projetos/asssetplus2.0/node_modules/@types/react-table/node_modules/@types/react/index”).ReactNode’.
Type ‘{}’ is not assignable to type ‘ReactNode’.ts(2786)
Follow the code below:
<div>
<SpreadSheets
workbookInitialized={spread => setSpread(spread)}
name="Asset"
>
<Worksheet name="Asset+" />
</SpreadSheets>
</div>
Waiting by answer to resolve my problem.
