title: How to clear input after submit with react
body: <p>how to clear the input inside this code after submit with the button</p>
  <pre><code>export default function Form({addTask}) {
  const [taskInp, setTaskInp] = useState(&quot;&quot;)
  return (
      &lt;div&gt;
          &lt;input
              type=&quot;text&quot;
              placeholder=&quot;Write here&quot;
              onChange={e=&gt;{
                  setTaskInp(e.target.value)
              }}
          /&gt;
          &lt;button onClick={()=&gt; {
              addTask(taskInp)
          }}&gt;Add Task&lt;/button&gt;
      &lt;/div&gt;
  )}
  </code></pre>
  <p>I would love to know what is the recommended way please</p>