Is there a way to avoid using createContainer?


Is it possible to start using Appollo now? If so, how to install?


BTW, I’ve switched to a cleaner way to handle Meteor methods in React, and passing them from a container into a child component:


import { someMeteorMethod } from '/imports/somewhere/methods';
import { promisizeMethod } from '/imports/helpers';

export default createContainer(() => {
  return {
    someMeteorMethod: promisizeMethod(someMeteorMethod),
}, ChildComponent)

Where promisizeMethod is:

function promisizeMethod(method) {
  return (...args) => {
    return new Promise((resolve, reject) => {, (error, result) => {
        if (!error) resolve(result);
        else reject(error);

And then inside the child component, I can call the method like so:

  arg1: 'Hello',
  arg2: 'World',
}).then(() => {
  /* success */
}, (error) => {
  /* error */


Just a note - if you’re not actually interacting with a library that requires promises, making a method into a promise makes it less powerful, for example you can’t access the onResultReceived callback:


Interesting, never even knew about that option. I’m having trouble seeing a situation where I’d use it. I just switched to promises to cut back on creating a bunch of wrapper functions:

const myMethod = (args, callback) => {, callback); // the original Meteor method

Because you can’t actually pass just the call method from the container:

return {

Of course I could just pass the whole method over, and the child component could call, but I like to keep my child components 100% pure (no Meteor references).