Component TextInput method focus problem

Can someone help me to solve this problem ?
i m getting error when i try to focus on textInput with reference using focus() method.

Correct way to focus on a component(TextInput) is to assign a reference to a component using { ref = React.createRef() }
and then we can use ref.current.focus() to focus on component.