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

react-meteor-data: handle.ready() is always false #361

Open
derwaldgeist opened this issue Jul 20, 2022 · 3 comments
Open

react-meteor-data: handle.ready() is always false #361

derwaldgeist opened this issue Jul 20, 2022 · 3 comments

Comments

@derwaldgeist
Copy link

derwaldgeist commented Jul 20, 2022

According to the docs, this should work:

const listLoading = useTracker(() => {
    // Note that this subscription will get cleaned up
    // when your component is unmounted or deps change.
    const handle = Meteor.subscribe('todoList', listId);
    return !handle.ready();
  }, [listId]);

However, if I try it out, the returned value is always true, i.e. ready() is always false.

@derwaldgeist
Copy link
Author

Note: I am using publishComposite in the background.

@radekmie
Copy link
Collaborator

  1. Does it work outside of useTracker? Like, in a standard Tracker.autorun?
  2. Does it work without the deps array (i.e., without the second useTracker argument)?

@derwaldgeist
Copy link
Author

2. Does it work without the deps array (i.e., without the second useTracker argument)?

This did not change anything. I have yet to try out 1.

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