title: React Native: Passing props between components and componentWillMount() method
body: <p>I'm using React Native 0.43. I've two components, named <code>ParentComponent</code> and <code>ChildComponent</code>. I want to pass some props from parent to child component. I'm using following code (abridged version) in parent component:</p>
  
  <pre><code>export default class ParentComponent extends Component {
  
    constructor(props) {
      super(props);
  
      this.state = {
        latitude: 34.7821,
      };
    }
  
    render() {
      return (
        &lt;View&gt;
          &lt;ChildComponent latitude={this.state.latitude} /&gt;
        &lt;/View&gt;
      );
    }
  
  }
  </code></pre>
  
  <p>My child component is as following:</p>
  
  <pre><code>export default class ChildComponent extends Component {
  
    constructor(props) {
      super(props);
  
      this.state = {
        latitude: props.latitude,
      };
    }
  
    componentWillMount() {
      console.log('Before Mount: ' + this.state.latitude)
    }
  
    render() {
      return (
          &lt;Text&gt;{'Mounted: ' + console.log(this.state.latitude)}&lt;/Text&gt;
      );
    }
  }
  </code></pre>
  
  <p>Now, my console shows following result:</p>
  
  <pre><code>2:14:12 AM: Before Mount: null
  
  2:14:12 AM: Mounted: null
  
  2:14:12 AM: Mounted: 34.7821
  </code></pre>
  
  <p>Now <code>componentWillMount()</code> in my original code has an API call to a web service which depends on the value of <code>this.state.latitude</code> which clearly is not been passed, at least on the first render. On second render, when <code>this.state.latitude</code> value become available, only the <code>render()</code> function executes, but i need this value in my <code>componentWillMount()</code> function.</p>
  
  <p>What I'm doing wrong here?</p>