react-new-window
react-new-window copied to clipboard
'NewWindow' cannot be used as a JSX component.
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