Passing react text field input values as parameters to a method
<p>I have the below input fields of which I need to get the entered inputs and pass it to the onClick event of the button shown below.</p>

<pre><code>&lt;input type="text" style={textFieldStyle} name="topicBox" placeholder="Enter topic here..."/&gt;
&lt;input type="text" style = {textFieldStyle} name="payloadBox" placeholder="Enter payload here..."/&gt;
&lt;button value="Send" style={ buttonStyle } onClick={this.publish.bind(this,&lt;value of input field 1&gt;,&lt;value of input field2&gt;)}&gt;Publish&lt;/button&gt;&lt;span/&gt;
</code></pre>

<p>I have a method called publish which takes two string arguments. In place of those strings, I need to pass the values entered in the input fields. How can I achieve this without storing the values in states? I do not want to store the input field values in state variables. Any help would be much appreciated.</p>