arunoda / react-komposer

Feed data into React components by composing containers.
MIT License
733 stars 70 forks source link

Export multiple meteor containers in one file #128

Closed Floriferous closed 7 years ago

Floriferous commented 7 years ago

I have a basic container with which I want to wrap multiple components in Meteor. But I can't figure out what the export pattern is?

Here is what I have:

function composer(props, onData) {
  if (Meteor.subscribe('SingleTodoLists').ready()) {
    const todoList = todoLists.find({}).fetch();
    onData(null, { todoList });
  }
}

export composeWithTracker(composer, Loading)(Component1);
export composeWithTracker(composer, Loading)(Component2);

This wrapper syntax is not really clear for me, so I'm unsure about what to try. Playing with export default and other variations yielded no result so far.