React Native + Meteor: react-native-meteor vs. meteor-client-bundler

React Native + Meteor: react-native-meteor vs. meteor-client-bundler  #javascript

  • React Native + Meteor: react-native-meteor vs. meteor-client-bundlerIf you’ve spent any time looking into building an app with React Native and Meteor you’ve likely come across the package react-native-meteor.
  • You may have also come across meteor-client-bundler which is a newer entry in the game.So what are they?Each package is designed to allow you to easily connect to and work with a Meteor server, via DDP, from a client that isn’t integrated with the Meteor build tool.They do this in different ways, each with benefits and drawbacks.This package integrates within your React Native app and is designed specifically for React Native.
  • This is an open source package where people are maintaining it on the side.Getting StartedIf you’re interested in getting up and running with a React Native + Meteor stack that uses react-native-meteor check out the boilerplate I’ve put together.Thank you to everyone that has made this package a reality and continues to put the time into maintaining it.
  • #ThankOSSMaintainersUnlike react-native-meteor this package is designed to work for any client — it was actually built when getting an Ionic app to work with Meteor.It also works in a different way — it’s a command line tool that will bundle the Meteor client code and put it into your React Native project rather than being a package that simply “speaks” DDP to communicate with a Meteor server.
  • So whenever you change something in your Meteor app you’ll want to re-bundle the client side code.BenefitsTakes the actual client side Meteor code and injects it into your React Native app making sure you’re running exactly what’s on the Meteor server.Use the “real” packages coming from Meteor.DrawbacksPotential mismatch of code injected between what’s running on the Meteor server and what’s on your user’s app.Dependence on the DOM.

If you’ve spent any time looking into building an app with React Native and Meteor you’ve likely come across the package react-native-meteor. You may have also come across meteor-client-bundler which…

@ng_real_ninja: React Native + Meteor: react-native-meteor vs. meteor-client-bundler #javascript

which is a newer entry in the game.

So what are they?

Each package is designed to allow you to easily connect to and work with a Meteor server, via DDP, from a client that isn’t integrated with the Meteor build tool.

They do this in different ways, each with benefits and drawbacks.

This package integrates within your React Native app and is designed specifically for React Native. The goal is to provide a one-to-one match of the client side Meteor functionality. Having built multiple apps on this package I can tell you it does this well.

This project is completely independent of Meteor — it’s just aware of the DDP protocol exposed by Meteor and makes easy to use wrappers around DDP to access it. That means it depends on third party code to do some things (minimongo, tracker, etc).

check out the boilerplate I’ve put together.

Thank you to everyone that has made this package a reality and continues to put the time into maintaining it. #ThankOSSMaintainers

this package is designed to work for any client — it was actually built when getting an Ionic app to work with Meteor.

It also works in a different way — it’s a command line tool that will bundle the Meteor client code and put it into your React Native project rather than being a package that simply “speaks” DDP to communicate with a Meteor server. So whenever you change something in your Meteor app you’ll want to re-bundle the client side code.

check out this boilerplate.

Thank you to everyone that has made this package a reality and continues to put the time into maintaining it. #ThankOSSMaintainers

I think both are solid solutions. They approach the problem in different ways and they’ve each got their benefits and drawbacks. Nothing is going to be perfect so weigh the pros and cons, make a decision, and when you run into an issue contribute back to the project.

If neither solution works for you you can always manage the ddp connection directly!

React Native + Meteor: react-native-meteor vs. meteor-client-bundler