None that I can think of that you have to have. One might be using the fetch
API that is going to be the new standard for AJAX requests. This is built into new browsers and also RN. This isn’t a Meteor type of package but a new one that’s popped up. It also ties in with my suggestion for simple-rest
below. Also using promises (and promise based NPM packages) in RN will make life easier, this is something new to Meteor users.
What are some common pitfalls to avoid?
Unless you really have to move quickly I would think twice about heavily coupling your RN to a Meteor backend. Not only are you tied to Meteor’s pub/sub system but the maintainers of any libraries you’re using.
Using tightly coupled tools can also lead you to having an unscalable app for no reason. For example in Meteor land it’s quite common to use a subscription for everything, whether it needs to reactively update or not… but this is a very inefficient way to do this (mostly because Meteor makes it hard to get non-reactive data). However, with RN and something like fetch or request, you can just make a normal REST API request to the Meteor server and have the API route return a Meteor method result or whatever a publication would have normally have returned. simple-rest can also handle login by providing you with the meteor login token.
It also depends on how much of your content is reactive. If you only have one thing that’s reactive and the rest can be updated manually I would use some of the simple-rest packages to use AJAX to fetch things the “normal” way and then use the Meteor specific subscriptions (with react-native-meteor or ddp-client) to setup a subscription as needed.
If you’re using a React app, Redux works really well for sharing state across components:
But i can totally understand if this is overkill or overloading the learning curve. There’s also GitHub - petehunt/minimongo-cache for a minimongo experience. If you haven’t learned redux yet and it seems daunting, mobx has had good reviews (I have’t tried it… happy with redux) MobX
Are you using any of these packages, and how was the integration like? Did you end up using Redux as a reactive store instead of something like a minimongo cache?
Started out with the first version of node-ddp-client and it was overkill for what I needed. I opted for long polling to get it out the door (reliably). I’ve tried minimongo cache and found that I created spaghetti and was hard to track data flow. I’m using redux with only the logger middleware, no dev tools. I like to keep it simple and prevent yak shaving.
Regarding performance, are there notable improvements to using RN+MeteorBackend instead of full stack Meteor?
Things are easier to maintain IMHO. I don’t like implicit magic as it’s caused more problems for maintainability (even though it makes the first weeks faster). Animation performance compared to Cordova is night and day. Things just work, unlike Cordova’s flaky API. No one has asked me if it’s a web/react-native app… while on Cordova several people would ask if it was a hybrid app.
Good luck