Skip to content

Instantly share code, notes, and snippets.

@navgarcha
Last active July 31, 2016 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save navgarcha/5f11c9d3cb9968f34de1e97c729e8597 to your computer and use it in GitHub Desktop.
Save navgarcha/5f11c9d3cb9968f34de1e97c729e8597 to your computer and use it in GitHub Desktop.
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