Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

React Native & TypeScript : Property 'focus' does not exist on type 'RefObject'

$
0
0

That's what I am doing:

  declare passCodeInput:  React.RefObject<TextInput>;

But here's an issue that I am getting while trying to call focus method:

setTimeout(() => this.passCodeInput.focus());

enter image description here

I call focus on current, like, this.passCodeInput.current!.focus()) but this won't work in my case.


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>