title: How to use useReducer instead of useState?
body: <p>Hi I am having a initial state as empty object,</p>
  <pre><code>let [value,setValue] = useState({});
  
  function onSubmit(){
    setValue({&quot;new Object&quot;})
  }
  </code></pre>
  <p>and updating it onSubmit in button click. Is there any way to implement this scenario in useReducer and also here i want to create a new state instead of mutating it. Your help or suggestion is much appreciated.</p>