Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_selectStory(story: any) {
const channel = addons.getChannel();
this._stories.setSelection({ storyId: story.id, viewMode: 'story' }, null);
channel.emit(Events.SELECT_STORY, story);
}
componentDidMount() {
const channel = addons.getChannel();
channel.on(Events.STORY_ADDED, this.handleStoryAdded);
channel.on(Events.SELECT_STORY, this.forceReRender);
this.handleStoryAdded();
}
componentWillUnmount() {
this.props.channel.removeListener(Events.SELECT_STORY, this.onStorySelected);
}