'ResizableBox' cannot be used as a JSX component

148 views Asked by At

Does anyone experience this same issue? I can't get trough this error Here is a screenshot:

C:/Users/marcu/OneDrive/Desktop/test/src/components/resizable.tsx TypeScript error in C:/Users/marcu/OneDrive/Desktop/test/src/components/resizable.tsx(30,11): 'ResizableBox' cannot be used as a JSX component. Its instance type 'ResizableBox' 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/marcu/node_modules/@types/react/index").ReactNode'. Type '{}' is not assignable to type 'ReactNode'. Type '{}' is missing the following properties from type 'ReactPortal': key, children, type, props TS2786

28 |   }
29 | 

30 | return <ResizableBox {...resizableProps}>{children}; | ^ 31 | }; 32 | 33 | export default Resizable;

I try everything, I even downloaded the project from the resource folder of the course I'm learning from and it has the same issue

1

There are 1 answers

1
Mohit Sharma On

Enter a code in terminal {npm i react-resizable}

And Import { import { Resizable } from 'react-resizable'; }