Answer the question
In order to leave comments, you need to log in
Get component reference inside jsx?
There is this code:
var App = React.createClass({
render: function () {
return (
<div>
<Menu />
<div className="main-wrapper">
<WorkArea />
</div>
</div>
);
}
});
var WorkArea = React.createClass({
render: function () {
return (
<div className="row">
<div className="col-md-3 left-column"><TreeView path="/" startload={true} parent={false} level={1}/></div>
<div className="col-md-9 right-column"><Tabs /></div>
</div>
);
}
});
ReactDOM.render(
<App />,
document.getElementById('root')
);
window.WorkAreaTabs.AddTab({
title: this.props.item.name,
content: "test"
});
Answer the question
In order to leave comments, you need to log in
After explanations in the comments, we decided on what is needed. Through refs, you can get a link to the component
Access to the component through this.tabs
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question