I am trying to use useRef hook this way. I want to get the value of textInput with it
let tagsRef = useRef(''); <TextInput ref={tagsRef} style={styles.textInputStyle} placeholder={'Add tags to subscribe to them'} placeholderTextColor={'lightgray'} /> </View> I am using react-native version:0.63.3
When I
console.log(----tag', tagsRef.current.focus()); It gives me undefined
Any suggestions please?
focus()even return something? Its just an action without any result (other than focussing the element). Could you explain what you want to do?