title: React updating prop and rendering based on boolean value
body: <p>I have a parent function component which has a boolean (which is set via child component and also used to render some container on parent component).</p>
  <p>Is the below setup fine in terms of updating and dynamic rendering based on isSomeBoolean?</p>
  <pre><code>const [isSomeBoolean, setisSomeBoolean] = useState(true);    
  const updateIsSomeBoolean = (boolVal) =&gt; {
      setisSomeBoolean(boolVal);
  }
  
  
  &lt;ChildComp updateIsSomeBoolean={updateIsSomeBoolean} /&gt; 
    
  {isSomeBoolean &amp;&amp; (
      &lt;div className=&quot;container&quot;&gt;
      ....
      &lt;/div&gt;
  )
  }
  </code></pre>
  <p>In the child component, somewhere I invoke the parent function as below;</p>
  <pre><code>props.updateIsSomeBoolean(false);
  </code></pre>