inProgress-team / react-native-meteor

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

setInterval, setTimeout, clearTimeout #192

Closed wandonye closed 7 years ago

wandonye commented 7 years ago

I'm converting a Meteor client into React Native codes. With react-native-meteor, the following three functions are not available.

Meteor.clearTimeout
Meteor.setTimeout
Meteor.setInterval

Any reason why it is not included. What would be an equivalent implementation without these three functions?

eawall commented 7 years ago

The equivalent functions are setTimeout, setInterval, clearTimeout, and clearInterval :)

http://facebook.github.io/react-native/releases/0.40/docs/timers.html#timers

wandonye commented 7 years ago

@eawall Ahh~ I thought Meteor.setInterval and etc work like Session and thus are accessible on the server as well. If that's not the case, then Timers in RN will do their jobs.

Another question arises then, is there a way to use ReactiveVar with React-Native-Meteor?