title: Input onChanged value not set in React Hooks
body: <p>I am using ReactHooks UseState and wanted to set value in useState but its not working.. why?? help me??</p>
  <p><strong>JS</strong></p>
  <pre class="lang-js prettyprint-override"><code>const [value, setValue] = useState({
    headline: '',
    paragraph: '',
  });
  
  const onChanged = (e) =&gt; {
    let { name, value } = e.target.value;
    setValue((prev) =&gt; ({ ...prev, [name]: value }));
  };
  </code></pre>
  <p><strong>HTML</strong></p>
  <pre class="lang-html prettyprint-override"><code>&lt;input
    value=&quot;{value.headline}&quot;
    onChange=&quot;{onChanged}&quot;
    type=&quot;text&quot;
    name=&quot;headline&quot;
  /&gt;
  </code></pre>