title: How to set React default props for object type
body: <p>We already know, how to set a defaultProps.</p>
  
  <pre><code>TestComponent.defaultProps = {
      isTest: true
  };
  </code></pre>
  
  <p>But I often used props as object type.</p>
  
  <p>In Parent,</p>
  
  <pre><code>render(){
      let sample = {
          isTest : true,
          isLoggedIn : true
      }
      return (
          &lt;div&gt;
              &lt;TestComponent sample = {sample} /&gt;
          &lt;/div&gt;
      )
  }
  </code></pre>
  
  <p>In child component, I want to set <code>isLoggedIn</code> to <code>false</code> as default. If not set (or not passed from Parent) <code>isLoggedIn</code>, default value is <code>true</code></p>
  
  <p>But I don't know how to set defaultProps for <code>object type</code></p>
  
  <pre><code>TestComponent.defaultProps = {
      sample : {
          isLoggedIn: false
      }
  };
  </code></pre>
  
  <p>How to do this ?</p>