title: How to wait until all of the properties of received synchronous array are set in React-Redux?
body: <p>I can't do map() function for rendering because the length of the array is always 0, even though I get data from the array. Is there a way to set time interval until the asynchronous array is loaded properly?</p>
  
  <p>This is mine code:</p>
  
  
  
  <pre class="lang-js prettyprint-override"><code>function ShortcutComponent({ usershortcuts }) {
      console.log(usershortcuts); // I get an array
      console.log(usershortcuts.length); //I get 0
      return (
          &lt;Button ui="headerButton" arrow={false} ripple={false} iconCls="icon-directions" border={false} handler={() =&gt; this.loadData()}&gt;
                  &lt;Menu title="Shortcuts"&gt;
                      {usershortcuts.map((item) =&gt; {
                         &lt;MenuItem key={item.id} iconCls={item.shortcutDefinition.iconCls} text={item.shortcutDefinition.description} /&gt;
                      }
                  &lt;/Menu&gt;
              &lt;/Button&gt;
      )
  }
  
  const mapStateToProps = (state) =&gt; {
      return { 
          usershortcuts: state.usershortcuts
      }
  };
  
  
  const mapDispatchToProps = (dispatch) =&gt; {
      return {
          actions: bindActionCreators(usershortcutAction, dispatch)
      }
  }
  
  
  export default connect(mapStateToProps, mapDispatchToProps) (ShortcutComponent);
  </code></pre>
  
  <p>As a evidence here is the picture:</p>
  
  <p><a href="https://i.stack.imgur.com/dBLwH.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dBLwH.png" alt="enter image description here"></a></p>