This is about the closed issue in #195.
Hi guys, I had the same problem of @souza-gsdev in #195 .
Hi @diego3g, your student from RocketSeat here, rsrs
In this case I was using only @rocketseat/unform and get de Form from this lib. Looking at https://codesandbox.io/embed/agitated-tdd-uf177?autoresize=1&expanddevtools=1&fontsize=14&hidenavigation=1&theme=dark
I see that the Form coming from @unform/web to use useRef.
To try fix this error in React, I installed @unform/web and @unform/core, so I get the Form from @unform/web instead of @rocketseat/unform. The useRef working but unfortunately the initialData stop working.
Conclusion:
The component Form coming from @unform/web you can use useRef, and the same component imported from @rocketseat/unform, you can not use this useRef. Maybe that Form is not exposed to use in useRef.
Is there some way to solve this @diego3g ?
Hello guys, I'm getting the same error in React Native when I use lib react native masked text, I did all the adaptation as suggested in the documentation React Native Input Mask
this is the message I get:
Warning: function components cannot receive refs. Attempts to access this reference will fail. Did you mean use React.forwardRef ()?
Check the TextInputMask rendering method.
Same problem as @EdsonLucasbd I'm trying to use the lib react native masked text with typescript, but I always receive this message: Warning: function components cannot receive refs. Attempts to access this reference will fail. Did you mean use React.forwardRef ()?
Any solution?
I cannot wrap my head around on how to use this forwardRef on react native.
It doesnt break the app or anything, but its really anoying and let me feeling like dumb =(
Does this mean it will be resolved soon? #339
Check this documentation of react
Most helpful comment
Hello guys, I'm getting the same error in React Native when I use lib react native masked text, I did all the adaptation as suggested in the documentation React Native Input Mask
this is the message I get:
Warning: function components cannot receive refs. Attempts to access this reference will fail. Did you mean use React.forwardRef ()?
Check the
TextInputMaskrendering method.