inputbox typed value stays even after submit


#1

Hello Kirupa,

I have finished the Todolist tutorial by watching your video and reading your book Learn React.
I came across a problem though. The text I typed in the inputbox stays after I press the submit button.
I don’t know how to fix it. Can you direct me, please? Here is the link to github https://github.com/siargao/todoList2
Cheers


#2

Without looking at your code, my guess would be that you may have not provided a setState value of an empty string to the inputBox on the submit function?


#3

Hello John, thanks for your time. Yes you are absolutely right. Thanks a lot again.