Last active
February 2, 2016 02:59
-
-
Save ciwolsey/6a2f3573e6e18a0db453 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 PostList from '../components/postlist/index.jsx'; | |
import {useDeps} from 'react-simple-di'; | |
import {composeWithTracker, composeAll} from 'react-komposer'; | |
export const composer = ({context}, onData) => { | |
const {Meteor, Collections} = context(); | |
if (Meteor.subscribe('posts.list').ready()) { | |
const posts = Collections.Posts.find().fetch(); | |
onData(null, {posts}); | |
} | |
}; | |
export default composeAll( | |
composeWithTracker(composer), | |
useDeps() | |
)(PostList); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment