title: Passing React button text value around
body: <p>Say I have this code:</p>
  
  <pre><code>&lt;button id="gnrl"  onClick={() =&gt; this.selectChannel()}&gt;General&lt;/button&gt;
  </code></pre>
  
  <p>How can I pass the text <code>General</code> around as a parameter? I.e. grep all the text between the 2 button tags?</p>
  
  <p>I have a function that does this:</p>
  
  <pre><code>  selectChannel = (channelValue) =&gt; {
      var x = document.getElementById("general").value;
      this.setState({ channelValue: x })
    }
  </code></pre>
  
  <p>But I don't want to get the value as that has to be a hardcoded property. I would like to be able to change <code>General</code> to anything else e.g. <code>Random</code> and that would be the value passed around. any ideas?</p>