title: Get prop that passed from child component
body: <p>I have an react native app where I render map in App.js and this is the states of App.js:</p>
  
  <pre><code>this.state = {
        region: null,
        shops: [
          {
            name: "name",
            rating: 0,
            coords: {
              latitude: 543543,
              longitude: 656546
            }
          }
        ]
      };
  </code></pre>
  
  <p>and this is the render code of it:</p>
  
  <pre><code> render() {
      const { region, shops } = this.state;
      return (
        &lt;SafeAreaView style={styles.container}&gt;
          &lt;Map region={region} places={shops} /&gt;
        &lt;/SafeAreaView&gt;
      );
    }
  </code></pre>
  
  <p>as you can see I pass the shops state to Map component and in map component I have this main render to render the MapView:</p>
  
  <pre><code>render() {
      const region = this.props.region;
      return (
        &lt;MapView
          style={styles.container}
          region={region}
          showsUserLocation
          showsMyLocationButton
        &gt;
          {this.renderMarkers()}
        &lt;/MapView&gt;
      );
  </code></pre>
  
  <p>you can see the this.renderMarkers() where the markers of shops exist:</p>
  
  <pre><code>renderMarkers() {
      return this.props.places.map((marker, i) =&gt; (
        &lt;Marker key={i} title={marker.name} coordinate={marker.coords} &gt;
          &lt;View style={{
            flexDirection: 'row', width: 70, height: 60,
            backgroundColor: 'none',
          }}&gt;
            &lt;Svg
              width={60} height={50}&gt;
              &lt;Image
                href={require('icon.png')}
              /&gt;
  
              &lt;Rating rating={marker.rating} /&gt;
  
            &lt;/Svg&gt;
          &lt;/View&gt;
  
        &lt;/Marker&gt;
      ));
    }
  </code></pre>
  
  <p>each marker contain Image and Rating components and what I'm trying to do it to pass the rating like this: rating={marker.rating} to the component of Rating</p>
  
  <p>now in the Rating component I'm trying to get the rating like this:</p>
  
  <pre><code>render() {
          let ratings = this.props.places;
          let stars = [];
  
          for (var i = 1; i &lt;= 5; i++) {
  
              if (i &gt; ratings.rating) {
  // do something
              }
  
          }
  
          return (
              &lt;View style={styles.container}&gt;
                  { stars }
              &lt;/View&gt;
          );
      } 
  </code></pre>
  
  <p>now you understand that I pass the whole object of states from App component to Map component then I want to pass only the rating prop from Map component to Rating component
  how to do that?</p>