You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah, it should be safe to use. withFormsy assigns a functional ref to the wrapped element which is equal to the innerRef prop you pass to it or a noop function if you don't pass anything.
We should definitely remove this default noop function, especially since the truthyness of the innerRef prop is checked before it is passed on to the wrapped component.
If you want to get rid of the warnings, just set the innerRef prop to null or false when using your component.
I made a stateless functional component and exported it with withFormsy(Component).
It works, but React prints warnings in the console:
"Stateless function components cannot be given refs. Attempts to access this ref will fail. Check the render method of Formsy(Component)"
Is there anything to do about this? I am not using refs in my component. It's me that doing something wrong or I can ignore it?
The text was updated successfully, but these errors were encountered: