Skip to content

Instantly share code, notes, and snippets.

@ciwolsey
Last active February 2, 2016 02:59
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 ciwolsey/6a2f3573e6e18a0db453 to your computer and use it in GitHub Desktop.
Save ciwolsey/6a2f3573e6e18a0db453 to your computer and use it in GitHub Desktop.
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