Skip to content

Type error after react version update #42

@nam-truong-le

Description

@nam-truong-le

Hi, I'm getting this build error after update react from "@types/react": "18.2.23" to "@types/react": "18.2.43":

Type error: 'MuiImage' cannot be used as a JSX component.
  Its type 'FC<MuiImageProps>' is not a valid JSX element type.
    Type 'FunctionComponent<MuiImageProps>' is not assignable to type '(props: any, deprecatedLegacyContext?: any) => ReactNode'.
      Type 'import("/home/runner/work/shop-app/shop-app/node_modules/@types/react-dom/node_modules/@types/react/index").ReactNode' is not assignable to type 'React.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'.

Can you have a look? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions