mui-image icon indicating copy to clipboard operation
mui-image copied to clipboard

Type error after react version update

Open nam-truong-le opened this issue 1 year ago • 3 comments

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.

nam-truong-le avatar Dec 10 '23 08:12 nam-truong-le

I am facing the same issue. :(

gabrielbuii avatar Jan 18 '24 14:01 gabrielbuii

@benmneb is there a plan regarding this issue with @types/mui-image please?

HunteRoi avatar Feb 17 '24 20:02 HunteRoi