gooftroop / react-image-magnify

A responsive image zoom component designed for shopping sites.
https://gooftroop.github.io/react-image-magnify
MIT License
18 stars 3 forks source link

Example with passing in a custom Image component #15

Open nikos-manolas opened 2 years ago

nikos-manolas commented 2 years ago

Trying to pass in the Nextjs Image component as the imageComponent. But getting a warning like this and magnify does not work.

Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?

Check the render method of CursorPosition. at ZoroImageComp at div at CursorPosition (webpack-internal:///./node_modules/@blacklab/react-image-magnify/dist/src/CursorPosition.js:87:13) at ReactImageMagnify (webpack-internal:///./node_modules/@blacklab/react-image-magnify/dist/src/ReactImageMagnify.js:34:13) at div

Any help or example would be much appreciated.

gooftroop commented 2 years ago

Hi @nikos-manolas I'll look into this. Do you have a sandbox you can share or a repo I can clone down to test?