title: react component lifecycle to execute before render
body: <p>I want to have some check before react component is rendered..</p>
  
  <p>Lets say I have a component which renders something like</p>
  
  
  
  <pre class="lang-jsx prettyprint-override"><code>render() {
      const {videos, actions} = this.props
  
      return (
          &lt;div&gt;
              &lt;List /&gt;
          &lt;/div&gt;
      )
  }
  </code></pre>
  
  <p>But before rendering the list I want to have custom check on the list... 
  What I meant to say is before showing the <code>&lt;List /&gt;</code> component I want to have some check and only after that check is finished I want to show the component with render method .. </p>
  
  <p>The check I am mentioning here might be anything like the list should be 10 in count or anything.</p>
  
  <p>I have tried following </p>
  
  <pre class="lang-jsx prettyprint-override"><code>componentWillUpdate(){
      console.log("Component will update")
  }
  
  shouldComponentUpdate(){
      console.log("Should component update")
  }
  </code></pre>
  
  <p>From the react documentation I knew that both of them are called before render... But when I do this nothing is printed in the console but <code>render</code> method is called.. </p>
  
  <p>I know that <code>componentWillMount()</code> is called before render but what I want is a function which calls render only after the completion or return from the function</p>
  
  <p>Hope you understand and need help</p>