Why don't new paginated records trigger pub/sub method?


I have paginated records that show 10 at a time. Users have the option to delete a record(s) on a page and then some from the next page come trickling in.

I would’ve thought that the new records coming in would trigger pub/sub methods. However, this is not the case. I added a console log in my publish function and verified that it does not get triggered when new records get populated onto a page.

It does however get called when I click on a new page.

My publish function publishes 10 records at a time and is called reactively when pages change. So how is it that new records from another page can come trickling in without the function actually getting hit?

Publications are not inherently reactive. It’s the behaviour of the cursor which drives reactivity in the client. For example, see https://guide.meteor.com/data-loading.html#advanced-publications:

On the server however, the reactivity is limited to the behavior of the cursors you return from your publish functions. You’ll see any changes to the data that matches their queries, but their queries will never change .

1 Like

Thanks for clarifying!