konradkalemba / tabler-icons-react

🎨 Tabler Icons for React
https://tabler-icons-react.vercel.app
MIT License
198 stars 9 forks source link

Forward Ref Error because of Link component #12

Closed blyxyas closed 2 years ago

blyxyas commented 2 years ago

(Using Next.js)

In the client console it warns the following:

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

Check the render method of ForwardRef.

After some troubleshooting I've came to the conclusion that the Link from next/link is the cause of this error, is there a solution?

konradkalemba commented 2 years ago

I believe you have to wrap icon component with React.forwardRef function like presented in Next.js documentation. I'm currently away from computer, so unfortunately I can't help you more here.