title: async function in useeffect get old prop
body: <p>i have some code like:</p>
  
  <pre><code>let props.n default =1
  
      function consoleLog()
      {
          dispatch({n:2});
              useEffect(()=&gt;
              {
                     async function c()
                     {
                       await new Promise((resolve,reject)=&gt;setTimeout(() =&gt;resolve(), 1500));
                       console.log(props.n);
                     }
                     c();
              },[]);
          return(null);
      }
  </code></pre>
  
  <p>I get the result is 1 , but not 2 , 
  how can i use the new props but not the old props?</p>