[Reactjs] Referência instância filho

A API this.props.children</code> is not the things when we want to reference the instance creating in render() function. The only way to reference it is adding ref property in render() function.

E, se for dinâmico, use React.cloneElement</code> to set ref.js render: function () { var refPages = this.state.pages.map(function(page) { return React.cloneElement(page, {ref: page.key, key: page.key}); }, this); return ( <div className="pageslider-container"> {refPages} </div> ); }