I’m about to embark down this road and wondering if there’s anything to look out for…
Definitely! I’ve been using react-native-meteor just because I know how to hook it up and didn’t see an example app for MCB+RN yet. It looks like they’re generally the same? They let you connect to a websocket and have some meteor helpers. It seems maybe MCB is the longer-term solution. It’d be nice to see an MCB+Redux+RN example app.
MCB doesn’t work on React Native due to the missing DOM , and I don’t think that this will work in the near future.
Issue @ https://github.com/Urigo/meteor-client-bundler/issues/12#issuecomment-292805713
They aim the same goal: decouple Meteor’s client and server sides.
But the difference is that:
- react-native-meteor is a rewrite of Meteor’s client APIs delivered within a custom DDP client.
- MCB is the actual Meteor’s client core bundled into a single JS file.
Unfortunately, as mentioned by @XTA, it seams that the Meteor’s client core code has a deep depency in DOM’s document
which breaks on non-DOM environments like native apps.
That’s kind of a bummer but react-native-meteor works fine for my needs so far.
Yeah, but I was “shocked” that they don’t use the “real” Tracker/Minimongo environment. The issue about it is hidden, but IMHO it is important to know that there is a huge different between the common behavior in a Meteor environment which could cause performance issues -> GitHub Issue
I’m building an app with react-native-meteor and Expo right now. Everything works fine just as with a regular React Native app.
can you share what you do? i am very new to react native and would like to start with it
This article by @spencercarli is a good starting point. He also has many other articles on React Native + Meteor.
Edit: linked wrong website.
@a.com @leocavalcante @XTA
UPDATE: MCB now works with React Native!
So you can use the “real” tracker and minimongo in your React Native app.
You can checkout a boilerplate example here
and the docs here