up vote
0
down vote
favorite
I currently have my react-komposer set up like this:
const composer = (params, onData) => {
const subscription = Meteor.subscribe('comments');
if (subscription.ready()) {
const comments = Comments.find({approved: true }, {sort: {timestamp: -1}}).fetch();
onData(null, { comments });
}
};
export default composeWithTracker(composer, Loading)(CommentsList);
What I would like is to pass another selector to my find query which is based on the props of this component.
So I imagine it something like this:
const comments = Comments.find({approved: true, city: {activeCity} }, {sort: {timestamp: -1}}).fetch();