Skip to content

Instantly share code, notes, and snippets.

@jacobp100
Created July 16, 2016 21:12
Show Gist options
  • Save jacobp100/e1856bd2b40e9e1f3f17e2bcbd0bc4a3 to your computer and use it in GitHub Desktop.
Save jacobp100/e1856bd2b40e9e1f3f17e2bcbd0bc4a3 to your computer and use it in GitHub Desktop.
class Cats extends Component {
static fetchData({ dispatch }) {
return dispatch(getCats());
}
componentDidMount() {
Cats.fetchData(this.props);
}
render() {
...
}
}
export default connect()(Cats);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment