How to clear an input value after form submit in React?

Posted by Ramesh Singh | Updated on

Want to clear an input value after form submit in React? You are having a controlled component where input value is determined by this.state.city. So once you submit you have to clear your state which will clear your input automatically.


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers