title: How do I return values from a React component?
body: <p>I made a slider component, using JQueryUI, which internally computes its current slider value. I am rendering it like this: </p>
  
  <pre><code>&lt;Slider config={config} value={this.getValue} /&gt;
  </code></pre>
  
  <p>Inside the slider component I call this <code>getValue()</code> function and pass the current slider value: </p>
  
  <pre><code>this.props.value(this.state.sliderValue); 
  </code></pre>
  
  <p>In the jsx file where I rendered the component I can only retrieve the value of the slider inside the callback function getValue(). Is there any way I can directly get the value instead of inside the callback? </p>