react native textinput losing focus after each character

Solutions on MaxInterview for react native textinput losing focus after each character by the best coders in the world

showing results for - "react native textinput losing focus after each character"
Alexander
18 Apr 2020
1its happen beacuse when we type at that time our state get changed due to that 
2our jsx get render and 
3that mens our TextInput also reRender so that why its loosing focus 
4
5one more thing it also happens when  we use our componet out side form the return 
6
7and call the input as jsx function like this
8
9const MyINPUT=()=>(
10
11<TextInput
12 '''''
13 .....
14  .....
15 />
16)
17
18
19return (
20<View>
21  <MyINPUT/>
22 </View>
23)
24
25to resolve that there are  diff methods you can try base on your code
26
271: one is use autofocus=true in TextInput
282: another is use onBlur method
293: or create a button on click save the input text 
304: or try to use class componet
31
32