altence / lightence-ant-design-react-template

Free and easy-to-use admin template based on React 17+
https://altence.com/lightence-landing
MIT License
1.01k stars 258 forks source link

InnerRef bug for BaseCheckbox #274

Closed DenisYurchik closed 11 months ago

DenisYurchik commented 1 year ago

Describe the bug 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 Styled(BaseCheckbox).

To Reproduce Steps to reproduce the behavior:

  1. Go to '/auth/login' in web browser
  2. See browser console

Desktop:

mikeng76 commented 1 year ago

I have the same issue. Has anyone fixed this?

I don't see this on the live demo: https://lightence-ant-design-react-template.pages.dev/auth/login

But for my setup it does: http://91.228.52.235:3000/auth/login

I searched and found this: https://stackoverflow.com/questions/56484686/how-do-i-avoid-function-components-cannot-be-given-refs-when-using-react-route

But don't know how to apply it.

image

This is really annoying. Would appreciate if anyone can look into it.

Rozhkow commented 11 months ago

Thank you for reaching out to us. We appreciate your interest in the Lightence platform. An update to our product will be released soon in which you will not encounter the problem with console werning, thank you.