title: React Native : how to change <Text> value dynamically
body: <p>I want to change  value dynamically at some event</p>
  
  <p>Event:</p>
  
  <pre><code>BackgroundGeolocation.on('location', (location) =&gt; {      
      currentDistance =  distance(previousLatitude,previousLongitude,latitude,longitude);
  
              this.setState({
                  text: currentDistance                
              });                                   
  
      });
  &lt;Text&gt;
     Moving : {this.state.text}
  &lt;/Text&gt;
  </code></pre>
  
  <p>does anyone know how to change text or any other method to achieve?</p>