benmneb / mui-image

⚛ React component to display images as per the Material Design guidelines. For apps using Material-UI v5.
https://mui-image.surge.sh
ISC License
50 stars 14 forks source link

Type error after react version update #42

Open nam-truong-le opened 10 months ago

nam-truong-le commented 10 months ago

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.

gabrielbuii commented 9 months ago

I am facing the same issue. :(

HunteRoi commented 8 months ago

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