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); },
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); },