2016-04-18 14 views
0

リアクタ・ルータには、コンポーネントのレンダリング時にイベントが発生しますか?私はgithub wikiページでそれを見つけられませんでした。ちょうど角UI-ルータで、このイベントのような
ワン: $viewContentLoaded - fired once the view is loaded, after the DOM is rendered. The '$scope' of the view emits the event. リアクタ・レンダリング・イベント

答えて

0

あなたにルーティングされているコンポーネント上componentDidMountライフ・サイクル・メソッドを使用します。

var YourComponent = React.createClass({ 

    componentDidMount: function() { 
     // Code here 
    }, 

    componentWillUnmount: function() { 
    }, 

    render: function() { 
     return (
     <div> 

     </div> 
    ); 
    } 
}); 

module.exports = YourComponent; 
+0

ありがとうございます。よく働く! – ailionx

関連する問題