0

Kindly refer to the codesandbox link for code.

Basically the input is lagging by one key press although I explicitly added the compute function in the callback of setState.

Edit: I understand the solution but I want to know why this is happening since I calling the function in the callback of setState.

Aditya Jamuar
  • 117
  • 1
  • 10

1 Answers1

1

You can use

onChangeText method which gives value directly.

<TextInput onChangeText = {(value)=>{console.log(value)}} />
Jaydeep Galani
  • 4,842
  • 3
  • 27
  • 47