title: reactjs issue show loading while dom render with more logic
body: <p>I am facing issue with showing loading while DOM is rendering.
  I know there are other related posts which focus on showing loading while data is being fetched, but mine is little different. 
  I have logic in render method to render grid (with more data) that takes longer time. In this case, render function wont show loading since its still processing the logic.
  Any help would be appreciated.</p>
  
  <p>e.g.,</p>
  
  <pre><code>    class DataGrid extends React.Component {
  
    constructor(props, context) {
       this.state = {isLoading : false}
    }
  
    render(){
  
       //logic to render.
       .. 
       ..
       ..
       //takes long time
       return(
                &lt;div&gt;
                  &lt;Loader isLoading={this.state.isLoading} /&gt; // This will not work since render is not complete
                  &lt;OtherComponent /&gt;
                &lt;/div&gt;
       )
    }
  }
  </code></pre>