react-diagrams icon indicating copy to clipboard operation
react-diagrams copied to clipboard

PortWidget cannot be used as a JSX component

Open loziobrus opened this issue 3 years ago • 1 comments
trafficstars

After updating to React 18 and to v6.7.4 every PortWidget and LinkWidget are failing to render and throw following ts error:

JSX element class does not support attributes because it does not have a 'props' property.ts(2607) 'PortWidget' cannot be used as a JSX component. Its instance type 'PortWidget' is not a valid JSX element. Type 'PortWidget' is missing the following properties from type 'ElementClass': context, setState, forceUpdate, props, and 2 more.ts(2786).

Usage is as simple as that: <PortWidget engine={engine} port={port} key={port.getID()}>...</PortWidget>

loziobrus avatar Nov 04 '22 08:11 loziobrus

I'm getting this also.

electronicalias avatar Nov 27 '23 09:11 electronicalias