title: How to change value of a product based on quantity in react native
body: <p>I am trying to make the price of product change, when user select different weight. 
  For example lets say user want to buy mango, default i am showing price of mango /kg, now if user change weight from 1kg to 500gm then the value should change.</p>
  
  <p>I have on showing the product and drop down option to show available weights. But not sure how to change the value of the of price based on weights.</p>
  
  <p>Here is my code to display list of products  and weight options</p>
  
  <p><strong><em>PS: This is a product listing screen where i want to make the change to happen</em></strong></p>
  
  <p><strong>Productlisting.js</strong></p>
  
  <pre><code>render() {
      return (
          &lt;View style={styles.productListingContainer}&gt;
  
              &lt;ListView
                  enableEmptySections={ true }
                  dataSource={ this.state.dataSource }
                  renderRow={ this._renderRow } /&gt;
          &lt;/View&gt;
      )
  }
  
   //Rander products
    _renderRow =(rowData)=&gt; {
          return (
              &lt;ProductThumb { ...rowData } onPress={() =&gt; this._pressProduct(rowData.id) } /&gt;
          )
      };
  </code></pre>
  
  <p><strong>Productcard.js</strong></p>
  
  <pre><code>  //Onvalue change
    onValueChange(value: string) {
          this.setState({
              selected: value,
          });
      }
  
   //This is render content
   &lt;TouchableOpacity style={ styles.row } onPress={ this.props.onPress }&gt;
                  &lt;Image style={ styles.image } source={{ uri: rowData.imageUri }} /&gt;
                  &lt;View style={ styles.textsHolder }&gt;
                      &lt;Text ellipsizeMode='tail' numberOfLines={2} style={ [styles.name,stylesheet.mb4] }&gt;{ rowData.name } &lt;/Text&gt;
  
                      &lt;View style={[{flexDirection: 'row'},stylesheet.mb4]}&gt;
                          &lt;Text style={ styles.prize }&gt;$ { rowData.prize } &lt;/Text&gt;
                          {
                              (rowData.regularPrize) ? &lt;Text style={ styles.regularPrize }&gt;$ { rowData.regularPrize }&lt;/Text&gt;: null
                          }
                      &lt;/View&gt;
  
                      &lt;View style={{flexDirection: 'row',flex:1}}&gt;
  
                          &lt;View style={styles.pickerWraper}&gt;
                              &lt;Picker
                                  mode="dropdown"
                                  style={styles.picker}
                                  selectedValue="200gm"
                                  itemStyle={styles.pickerItem}
                                  onValueChange={this.onValueChange.bind(this)}
                              &gt;
                                  &lt;Item label="200gm" value="key0" /&gt;
                                  &lt;Item label="1kg" value="key1" /&gt;
                              &lt;/Picker&gt;
                          &lt;/View&gt;
  
                          &lt;Button iconLeft small style={[stylesheet.pr5,stylesheet.ml5,styles.subbutton]}&gt;
                              &lt;Icon style={{marginRight:4, marginLeft:6,color:colors.white}}  active name="cart" /&gt;
                              &lt;Text style={{color:colors.txt_white}}&gt;Subscribe&lt;/Text&gt;
                          &lt;/Button&gt;
                      &lt;/View&gt;
                  &lt;/View&gt;
              &lt;/TouchableOpacity&gt;
  </code></pre>
  
  <p>Being a beginner to react native, and javascript framework as whole. i am really not sure what to look for to begin with. If anyone can give some pointer that will be very helpful. Thank you</p>