Check out example codes for "mongoose get all documents big". It will help you in understanding the concepts better.

Code Example 1

var query = templateData.find({}).stream();
query.on('data', function (doc) {
    // do something with the mongoose document
}).on('error', function (err) {
    // handle the error
}).on('close', function () {
    // the stream is closed
});

Learn ReactJs, React Native from akashmittal.com