Hi guys.
I’m trying to use this lib.
The library creates a pyramid of doom of callbacks:
my_sheet.useServiceAccountAuth(creds, function(err){
// getInfo returns info about the sheet and an array or "worksheet" objects
my_sheet.getInfo( function( err, sheet_info ){
console.log( sheet_info.title + ' is loaded' );
// Meteor update collection here
});}):
To make it work I had to use Meteor.bindEnvironment() twice, a function which is not on the docs so I guess it’s not considered a best practice.
I get that the ultimate solution to avoid a pyramid of doom is to use promises or async await, but when we meet nested callback code what is the beast approach to update collections or reactive vars?