Skip to content
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

Arguments with reactive parameters #6

Open
adrdomeniconi opened this issue Nov 26, 2013 · 1 comment
Open

Arguments with reactive parameters #6

adrdomeniconi opened this issue Nov 26, 2013 · 1 comment

Comments

@adrdomeniconi
Copy link

Hi, I´ve a question, I didn´t understand very well when you said "If your subscriptions arguments are going to reactively change, simply pass in functions, and the paginated sub will evaluate them within it's own internal autorun block." Do you have any example on how to do this?

Thank you

@tmeasday
Copy link
Owner

Something like:

Meteor.subscribeWithPagination('posts', function() { return Session.get('postOrder'); }, 10);

Where you publication would look something like

Meteor.publish('posts', function(order, limit) { ... })

AS OPPOSED TO:

Deps.autorun(function() {
  Meteor.subscribeWithPagination('posts', Session.get('postOrder'); , 10);
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants