Skip to content

Instantly share code, notes, and snippets.

@RealDeanZhao
Created July 24, 2016 04:57
Show Gist options
  • Save RealDeanZhao/28267f32251868109b01fd19f3b7a378 to your computer and use it in GitHub Desktop.
Save RealDeanZhao/28267f32251868109b01fd19f3b7a378 to your computer and use it in GitHub Desktop.
class ClassBase extends React.Component<any, any>{
componentWillMount = function (): any {
const {topicList, dispatch} = this.props;
dispatch(fetchTopics());
};
render() {
return (
<div></div>
);
}
}
const mapStateToProps = (state: any, ownProps: any): any => ({
});
export const TopicList = connect(mapStateToProps)(ClassBase);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment