I just finished building the app Fantasy Suite for iOS with react native and meteor. It’s the brainchild of some harvard MBA students, and is basically fantasy sports for the bachelor TV show.
##The web admin interface (built with ScorpiusJS, thanks @rwatts!)
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.
That’s awesome! Congrats on releasing it!
Thanks for this and congrats !
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.
Finally, for offline, I wrote the package react-native-meteor-offline, give it a shot
Two other fantasy sports apps built with Meteor are:
- Draft Fantasy (also uses RN)
- Boom Fantasy
Boom just closed another $2m round bringing their funding to $3.4m I believe.
Thanks for your answer and the tips.
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.
Expo does 90 - 95% of what you’ll probably need, including AsyncStorage.
redux-persist behind the scenes in my offline package, which worked fine. There’s also a version mongodb for react native that includes offline capabilities, here: https://github.com/smartdemocracy/react-native-local-mongodb