Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
I encountered an issue where attempting to assign ref to a function component throws a warning: "Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?".
When I remove the ref parameters from the controller fields, the issue resolves, and the code works as expected. However, we need to properly handle ref in the Select component by implementing or wrapping it with React.forwardRef() to avoid this warning and ensure proper functionality.
Any insights on integrating ref with function components in this scenario would be helpful!
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
I encountered an issue where attempting to assign ref to a function component throws a warning: "Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?".
When I remove the ref parameters from the controller fields, the issue resolves, and the code works as expected. However, we need to properly handle ref in the Select component by implementing or wrapping it with React.forwardRef() to avoid this warning and ensure proper functionality.
Any insights on integrating ref with function components in this scenario would be helpful!