title: Issues with useReducer not synchronously updating the state
body: <p>According to <code>React</code> docs :</p>
  
  <blockquote>
    <p>useReducer is usually preferable to useState when you have complex
    state logic that involves multiple sub-values or when the next state
    depends on the previous one.</p>
  </blockquote>
  
  <p><strong>1.</strong> can somebody explain me why <code>useReducer</code> is not updating the state synchronously ?</p>
  
  <pre><code>const reducer = (state, action) =&gt; {
      if( action.type === 'ADD_VALUE') {
          console.log(`STATE IN REDUCER`, [...state, action.path]) // =&gt; ["1.1"]
          return [...state, action.path]
      }   
  }
  
  const [state, dispatch] = useReducer(reducer, [])
  
  &lt;input type="button" onClick={() =&gt; {
      dispatch({ type: 'ADD_VALUE', path: "1.1"})
      console.log(`STATE`, state) // =&gt; []
      // here i want to do some stuff based on the lastest updated state (["1.1"] and not [])
      // for example dispatch an action with redux
  }}/&gt;
  </code></pre>
  
  <p><strong>2.</strong> How can I do some stuff (dispatch a redux action) based on the lastest updated state (<code>["1.1"]</code> and not <code>[]</code>) ?</p>