First of all, greetings to everyone here. I’m new here, I’m new to Meteor, and this is my first post.
As usual, reactivity is what drove me to Meteor, much like everyone else. So, the goal is to maintain that.
Use case
Suppose you have a Client collection. There are 10 clients in that collection.
Here is what you want to do, at the same time:
- Print the total number of Clients
- Show a list of Clients filtered by some conditions
The challenge
The problem I faced, is that when I create a subscription, for example “all-clients”, “filtered-clients”, they all go to the same mini-mongo to the Client side. And I am not sure how do I get each one without mixing them. When I subscribe to “all-clients”, the list is full (10 people, 10 items in the list); and when I subscribe to “filtered-clients”, both are also updating to fewer people/items.
The Question
How do I separate these two? This is just example of 2 items, but I could think of situations where more than 3 conditions are required.
I am planning to move my project to React; that might be relevant.