title: how to use constructor and update constructor values in JavaScript
body: <p>I want to access the constructor variable and use them throughout my code at some part of my code I need to update it too </p>
  
  <p>I am trying to update react-native Picker value with this code</p>
  
  <p>This is how I use the constructor: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>constructor(props) {
      super(props);
      this.Locations = _.uniq(_.map(this.props.Bikes, 'location'));
      this.selectedLocationValue = this.Locations[0];
    }</code></pre>
  </div>
  </div>
  </p>
  
  <p>This is where I update it: </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;Picker
    mode='dropdown'
    selectedValue={this.selectedLocationValue}
    onValueChange={(itemValue) =&gt; { this.selectedLocationValue = itemValue; }}
  &gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I cant change It to other values this is the problem that I am facing  </p>