'What is the difference between [Document,Document] and [{},{}] with meteorjs?
const sample1 = useTracker(() => {
// …
return Collection1.find({}).fetch()
})
console.log(sample1)
// [Document,Document]
// 0:Document {_id:’1223123’, name:’sample’}
// 1:Document {_id:’1211111’, name:’sample2’}
const sample2 = useTracker(() => {
// …
return Collection2.find({}).fetch()
})
console.log(sample2)
// [{},{}]
// 0: {_id:’456456’, name:’sample’}
// 1: {_id:’654654’, name:’sample2’}
I’m using useTracker and what is the difference between [Document, Document] and [{},{}]?
Both are getting documents but sample1 has Document letter and sample2 doesn't.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
