inProgress-team / inProgress-team/react-native-meteor
Allow using Trackr outside createContainer/getMeteorData
- Dominant language
- JavaScript
- Stars
- 688
- Forks
- 200
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I'm trying to keep some subscriptions active while navigating to new routes.
I'm subscribing to a collection in one scene and passing some of the information to another scene through the route object.
The issue is that when I call push method from the navigator object the scene's components are unmounted and so the subscription stops and I lose the reactivity.
How to avoid that?
My first idea was to handle the subscription in the common root component which is the navigator however it seems odd and is not really flexible.
So I'm thinking of using a state manager like mobx or redux. In this case I would like to reuse this react-native-meteor library which works really well and avoid using raw DDP. Can I just wrap my Meteor.subscribe, col.find, Accounts.login, ... in a Trackr.autorun() inside my store? Or do I have to do more? By looking at the Mixins.js source it seems that there is more to it.
Thanks !
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.