react-new-window icon indicating copy to clipboard operation
react-new-window copied to clipboard

'NewWindow' cannot be used as a JSX component.

Open Ofer-Gal opened this issue 3 years ago • 0 comments

I created component just like the example: const Demo = () => ( <NewWindow> <h1>Hi 👋</h1> </NewWindow> ) I get TypeScript Error: (alias) class NewWindow import NewWindow 'NewWindow' cannot be used as a JSX component. Its instance type 'NewWindow' is not a valid JSX element. Type 'NewWindow' is missing the following properties from type 'ElementClass': render, context, setState, forceUpdate, and 3 more.ts(2786)

I have to use TypeScript in SPFx What am I doing wrong? Thanks

Ofer-Gal avatar Mar 20 '22 14:03 Ofer-Gal