There are two ways to go about doing this.
Create a state in the constructor that contains the text input. Attach an onChange event to the input box that updates state each time. Then onClick you could just alert the state object.
handleClick: function() { alert(this.refs.myInput.value); },