Closed
Description
It'll be great if one could namespace references to backing instances returned from render.
Silly example:
var Editor = React.createClass({
componentDidMount: function() {
if(this.refs.hasOwnProperty('syntax') {
for(var lang in this.refs.syntax) {
var editor = this.refs.syntax[lang];
editor.prettify().colorize();
}
}
this.refs.plain.prettify();
},
render: function() {
return (
<div id='content'>
<TextEditor ref='syntax.javascript' />
<TextEditor ref='syntax.html' />
<TextEditor ref='syntax.css' />
<TextEditor ref='plain' />
</div>
);
}
});