Closed kolyasya closed 1 year ago
I haven't been using it with react anymore, but most likely the issue is that Meteor does not register an active observer for the subscription.
At the time of the implementation for meteor to get data inside react components react-meteor-data
package was used which provided the getMeteorData()
method to use for setting up subscriptions.
Could you try wrapping the call to this.projectsPagination.getPage()
in the withTracker()
method from meteor?
@Kurounin it is already inside withTracker
method, which works the same as withTracker
as I understand.
Can you post part of the code where you call projectsPagination.getPage()
?
@Kurounin does this screenshot works fine for you or you want me to post entire component?
That's strange. I would have expected it to work as it is written. Can you create a sample project reproducing this issue?
@Kurounin sure, later on this week
Did you guys fix this? I have the same problem.
@Trescend There was no follow-up. If you can create a sample project reproducing the issue I can take a look at it.
Hi there.
I still have this issue. I'm trying to init Meteor.Pagination
with Meteor.Users
collection in withTracker
but in this case, the subscription will never be ready. Otherwise, if I'm initiating Meteor.Pagination
at the root level of source file - any user methods (like Meteor.loginWithPassword
or Meteor.logout
) doesn't work (e.g Meteor.loginWithPassword
was called, data about logged user was received and this was shown in the network tab but method callback wasn't invoked and won't be invoked). I found that this issue relates to the limit
option for pagination subscription or default transform_options
options and happens when opened more than one tab with my app (e.g two or more tabs with http://localhost:3000
in the Chrome, or one tab in the Chrome and one tab in Safari). When I removed limit
and default options
- methods were started to work again.
There is transform_options
with options. If I remove limit
and ...options
- methods will work
There is global
pagination subscription for Users. I can't make this locally for the component - because subscription will never be ready (As Nikolay mentioned above)
Hi @Devlin556 I haven't been using meteor with react for a few years, so I would need a simple repo with the current standard setup that reproduces this issue, in order to be able to debug it.
Could you create a repository on github that reproduces this issue?
@Kurounin Yesterday I noticed that it was cause by reactive
field. I set it to false and methods was started working fine. I think i can’t reproduce this so easy.
Hello, thank you for awesome and useful package.
I have troubles setting it up inside React component.
If I put publication definition outside of component everything works just fine:
But if I put it inside component constructor publication never loads. Sometimes it works (like 1 of 10 times) but usually not.
What am I doing wrong? Any ideas?