Imagine I have 2 collections
Post {
_id: ...
title: ...
}
Comment {
_id: ...
postId: ...
text: ....
}
On a post detail page, I want to see the post title and all of its comments which must be reactive.
- I can declare a
Meteor.methods
to return the post and its comments with one request but I dont know how to make the comments reactive. - I can get the post first and then
Meteor.subscribe
to its comments based on the post's id, but this solution requires 2 sequential requests which is not ideal.
How can I have both of them and still have comments reactive.
Thank you.