title: In react is there any way to wait for child components state and re-render the parent along with child component
body: <pre><code>import React, { Component } from 'react';
  
  export default class AddSpinner extends Component{
      componentDidMount(){
          //API call to thunk and a state gets updates in redux
      }
  
      render() {
          return (
              &lt;div &gt;
                  &lt;div&gt;
                      {/* jsx values */}
                  &lt;/div&gt;
                  &lt;div&gt;
                      {/* call another component basically a child component */}
                  &lt;/div&gt;
              &lt;/div&gt;
          );
      }
  }
  </code></pre>
  
  <p>So here in the render, there are few jsx and then the call to child component is happening where there is another API call in componentDidMount.
  My question is how do I wait for the child components API call to complete and return the state to parent and meanwhile not render the jsx that is called before the child component and show a spinner meanwhile. </p>