Last active
July 31, 2016 13:47
-
-
Save navgarcha/5f11c9d3cb9968f34de1e97c729e8597 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { requestPosts } from 'actions/posts'; | |
// .. | |
static need = [ | |
() => requestPosts() | |
] | |
componentDidMount() { | |
if (!this.props.posts) { | |
Posts.need.map((need) => this.props.dispatch(need())); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment