React-Native Meteor: Fetching data from database -
im building first react-native app meteor. i'm trying fetch data database can't work. have handle ready , stop properties doesn't contain object data. explain how can actual data database?
container in component:
export default createcontainer(() => { const handle = meteor.subscribe('details-list'); return { detailsready: handle.ready(), }; }, detailscontainer);
export in meteor app
export default () => { meteor.publish('details-list', () => { return details.find(); }); }
you need add data want in container, this:
export default createcontainer(() => { const handle = meteor.subscribe('details-list'); return { details: details.find(), detailsready: handle.ready(), }; }, detailscontainer);
Comments
Post a Comment