inProgress-team / react-native-meteor

Meteor Reactivity for your React Native application :)
MIT License
693 stars 210 forks source link

How do I change the subscription parameters in the component #326

Closed eugle closed 6 years ago

eugle commented 6 years ago

Meteor.subscribe('city.by.name’,?)

I want to know how to change the subscription parameters in the component, for example, the city below, according to the user input, how to do

export default withTracker(param => { let city = 'sz'; Meteor.subscribe('city.by.name’,city); return { list: Meteor.collection('city').find(), }; })(App);

Poor English, sorry

NoMaxLand commented 6 years ago

Hi @mozibrand , I have a similar problem from my app.

My solution : I passe args (like filters) to screenProps of AppNavigator (a "Reduxify" navigation). Maybe you can take example to resolve your situation ?

Else, have you got found any solution at your problem ? i'm interesting by any suggestions

Poor english too... Hope we understanding us ^^