react reset input field once navigation is done code example Example: how to empty form after submit react e.target.reset();