-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems displaying requests in React #22
Comments
You need to properly subscribe to all the data. In short you are missing certain data pieces on your client. Here is a sample of how you should publish: https://github.com/StorytellerCZ/Socialize-starter/blob/master/server/publications/friendships.js#L55 Note that I'm using publish composite which is a third-party package to publish all the related documents together. |
Okay thanks, but where in your code are you subscribing on this collection in the client? I'm having a bit trouble understanding it cause im using Tracker.React. |
I'm using Mantra, so I subscribe in container for the react component. |
Okay thanks! One last question, where are you sending the props that you 2016-10-20 22:13 GMT+02:00 Jan Dvorak notifications@github.com:
|
Not sure what you mean, I only have one prop, which is the list of requests which comes from container of the same name (go into the container file in that module to see them). |
Currently im just testing this package with sending a friendrequest like this:
askFriend(email){ var user = Accounts.findUserByEmail(email); user.requestFriendship(); }
and displaying the number of requests like this:
console.log('this.user: ', Meteor.user().numRequests());
But I am just getting up 0 whatever I do.
The text was updated successfully, but these errors were encountered: