AdamRisberg / react-image-magnifiers

A collection of responsive, image magnifying React components for mouse and touch.
MIT License
347 stars 60 forks source link

Not Working Properly #86

Open kevinvasoya opened 1 year ago

kevinvasoya commented 1 year ago

Hi, We are using Next.Js 12 and React 17 for our own project. We want to add side-by-side image magnifier zoom as a feature. I have added the module but it not working as expected. Also, we use Typescript Next.Js which gives an error of type conflict. Let me help with this issue. image 'SideBySideMagnifier' cannot be used as a JSX component. Its type 'ComponentType<SideBySideMagnifierProps>' is not a valid JSX element type. Type 'ComponentClass<SideBySideMagnifierProps, any>' is not assignable to type 'ElementType'. Type 'ComponentClass<SideBySideMagnifierProps, any>' is not assignable to type 'new (props: any, deprecatedLegacyContext?: any) => Component<any, any, any>'. Construct signature return types 'Component<SideBySideMagnifierProps, any, any>' and 'Component<any, any, any>' are incompatible. The types returned by 'render()' are incompatible between these types. Type 'import("c:/Users/KevinVasoya/Downloads/my-example/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'.