コード例 #1
0
ファイル: OfficerPage.react.js プロジェクト: invinst/CPDB
 componentWillReceiveProps: function (nextProps) {
   // OfficerPage is not rendered again if we change from OfficerPage to other OfficerPage
   var officerId = nextProps.params.id || '';
   OfficerPageServerActions.getOfficerData(officerId);
   StoryListAPI.get(officerId);
   TimelineAPI.getTimelineData(officerId);
 },
コード例 #2
0
ファイル: OfficerPage.react.js プロジェクト: invinst/CPDB
 componentDidMount: function () {
   var officerId = this.props.params.id || '';
   OfficerPageServerActions.getOfficerData(officerId);
   OfficerPageStore.addChangeListener(this.updateOfficerData);
   TimelineStore.addChangeListener(this.updateTimelineData);
   StoryListAPI.get(officerId);
   TimelineAPI.getTimelineData(officerId);
 },