T O P
Oviduzz

u console.log for setInput and not for input. The value of the state is input and the setInput is the setter.


DoraDaExplora_

You should console.log the "input" variable, not the "setInput". In your case "input" stores the value, while the "setInput" is a method that sets the value to the variable. I recommend you to recall the hooks on the React documentation.


mountainunicycler

That’s exactly right; setInput is a function which you can call to store a value in your input variable—that’s why when you console.log() it you see a function. Most likely what you want to do is something using your “input” variable to make a search happen.


mubasshir_00

setInput is used for set the data of input. It should be console.log(input)