react-draft-wysiwyg
react-draft-wysiwyg copied to clipboard
Type error: 'Editor' cannot be used as a JSX component.
My package.json.
"next": "^14.0.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"@types/react": "18.2.6",
"@types/react-dom": "18.2.4",
"react-draft-wysiwyg": "^1.15.0",
That is the error.
Type error: 'Editor' cannot be used as a JSX component.
Its element type 'Component<EditorProps, any, any> | ReactElement<any, any> | null' is not a valid JSX element.
Type 'Component<EditorProps, any, any>' is not assignable to type 'Element | ElementClass | null'.
Type 'Component<EditorProps, any, any>' is not assignable to type 'ElementClass'.
The types returned by 'render()' are incompatible between these types.
Type 'React.ReactNode' is not assignable to type 'import("/Users/dobromirkirov/Documents/Work/Projects/the-common-ground/the-common-ground-platform/node_modules/@types/react-dom/node_modules/@types/react/ts5.0/index").ReactNode'.
Type 'ReactElement<any, string | JSXElementConstructor<any>>' is not assignable to type 'ReactNode'.
Property 'children' is missing in type 'ReactElement<any, string | JSXElementConstructor<any>>' but required in type 'ReactPortal'.