How do you handle relations in React Native?

Hey guys,
I’m currently using react-native-meteor within my RN application and try to handle some relational data. For example, I’m having a user_files collection and try to add some functions via transform method:

function transformDoc(doc) {
   doc.fileDoc = Meteor.collection('files').findOne({_id:doc.fileId});
   return doc;

 const UserFile = Meteor.collection('user_files',{transform:transformDoc});

The problem with this construction is, that Meteor can’t guarantee that all data is available when calling transformDoc. So sometimes the data of the files collection isn’t available while transforming the doc. In this case we don’t get a fileDoc, which causes errors in our RN application. I publish all data via publishComposite.

What would be the best way to handle such relations? I know that I could try to get the file document within a Meteor container and pass it to the React component, but that would be a little bit ugly.

can you use a method or does it have to be a publication?

It needs to be a publication, because the user can add files and needs to see them after adding. I’ll try to use Astronomy and check if I can append the data of the sub doc on server side. Because the sub doc doesn’t need to be reactive, this may work.