Thanks go to the team that made the very capable react-native-meteor app, as well as to expo for making RN development super easy and fun, and to @spencercarli for publishing dozens of helpful mediums posts on the subject of react native and meteor.
Can you give us more details on the react native app, did you use react-native-meteor or apollo or ddp ?
Any other things to mention, I have built this app with react-native-meteor found it amazing for setting meteor account, but account reactivity was a pain for me as there is a blink when opening the app again.
As I am about to build a new app with meteor and react native that needs offline first capabilities, choices are hard to make.
I used react-native-meteor with DDP, so just standard pub-sub stuff. At some point, I may try apollo, but it’s hard to sacrifice the simplicity and reactivity (although I understand there are ways to do this.
With regards to logging in, there are a couple of things that I found helpful. First is to set up a loading screen (or to use AppLoading component if you use expo, which I highly recommend) and display that until Meteor.user() is defined. Going another step, if you don’t want to wait for the server round trip (which I didn’t), you can check for the login token, like this: const token = await AsyncStorage.getItem("reactnativemeteor_usertoken");
It’s quick, and tells you that the user is logged in, and that Meteor.user() will be available shortly.
As I do not need reactivity and subscriptions and after recalling this conversation, I will go for an Apollo app for my mobile client and still use ddp for the web version.
I am thinking about using expo too, as I do not need many hardware things and as long as AsyncStorage works I should be fine.
I have also seen redux-offline as a good alternative, principles are somehow similar with the lib you built.