私は以下のボタンのonClickイベントに入力された入力を取得する必要がある以下の入力フィールドを持っています。メソッドにパラメータとしてテキストフィールドの入力値を渡す
<input type="text" style={textFieldStyle} name="topicBox" placeholder="Enter topic here..."/>
<input type="text" style = {textFieldStyle} name="payloadBox" placeholder="Enter payload here..."/>
<button value="Send" style={ buttonStyle } onClick={this.publish.bind(this,<value of input field 1>,<value of input field2>)}>Publish</button><span/>
2つの文字列引数をとるpublishというメソッドがあります。これらの文字列の代わりに、入力フィールドに入力された値を渡す必要があります。どのように私は状態で値を格納せずにこれを達成することができますか?私は入力フィールドの値を状態変数に格納したくない。どんな助けでも大歓迎です。
私はこれが最良の方法だと思います。私は[refsを使用しないでください](http://stackoverflow.com/questions/29503213/use-state-or-refs-in-react-js-form-components) –