Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type error: 'Editor' cannot be used as a JSX component. #1433

Open
DobromirKirovLime opened this issue Apr 18, 2024 · 0 comments
Open

Type error: 'Editor' cannot be used as a JSX component. #1433

DobromirKirovLime opened this issue Apr 18, 2024 · 0 comments

Comments

@DobromirKirovLime
Copy link

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'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant