inProgress-team / inProgress-team/react-native-meteor

Proper way to pass parameters from client to server

Open
#339 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
688
Forks
200
PR merge metrics
No merged PRs in 30d

Description

Hey guys,

I've been struggling with this for days. I have my server set up as:

`Meteor.publish('quests_filtered', (id) => {
return Quests.find({'_id': id});
});`

And my client like the below. You can think of quests exactly like a to do list.

`export default withTracker(params => {
Meteor.subscribe('quests_filtered', params.id);
return {
quests: Meteor.collection('quests_filtered').find({'_id': id}),
};
})(QuestFeed);`

The collection is defined as:

`const Quests = new Mongo.Collection('quests');`

However this.props.quests in the client side still returns the whole Quests collection and not those filtered by id.

I am at a complete loss - any ideas?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.