Is there an example where we can retrieve the value of a React element without the usage of refs? Is that possible?
var Test = React.createClass({
handle
I suppose you can just get the DOM Node with ReactDOM.findDOMNode(this);, and then get its innerText or whatever you need from it.
var Hello = React.createClass({
handleClick: function() {
var domNode = ReactDOM.findDOMNode(this);
alert(domNode.innerText);
},
render: function() {
return HEkudsbdsu
}
});
This is a bit of a runabout way of doing it, but it will work.
Note that pre 0.14 React, you'll just be using React and not ReactDOM.