将 firebase 承诺与 ES6 承诺混合
mix firebase promises with ES6 promises
据我所知,出于某种原因,FB 使用它自己的承诺实现而不是 ES6 标准。
是否possible/safe混合使用 FB 和 ES6 promise?例如在 'then' 链中 ?
let p1=firebase.auth().signInWithEmailAndPassword(email, password);
let p2=new Promise( ...
p1.then(ps).then( // ?? is this ok ?
谢谢!
firebase.Promise is the same as the native Promise implementation when available in the current environment, otherwise it is a compatible implementation of the Promise/A+ spec.
从其文档中提取:
https://firebase.google.com/docs/reference/js/firebase.Promise
检查您是否在您的环境中将 Promise 实现更改为 Bluebird 或类似的东西。
FireBase promises 和 ES6 标准 promise 应该可以毫无问题地协同工作。
希望对您有所帮助。
据我所知,出于某种原因,FB 使用它自己的承诺实现而不是 ES6 标准。
是否possible/safe混合使用 FB 和 ES6 promise?例如在 'then' 链中 ?
let p1=firebase.auth().signInWithEmailAndPassword(email, password);
let p2=new Promise( ...
p1.then(ps).then( // ?? is this ok ?
谢谢!
firebase.Promise is the same as the native Promise implementation when available in the current environment, otherwise it is a compatible implementation of the Promise/A+ spec.
从其文档中提取: https://firebase.google.com/docs/reference/js/firebase.Promise
检查您是否在您的环境中将 Promise 实现更改为 Bluebird 或类似的东西。
FireBase promises 和 ES6 标准 promise 应该可以毫无问题地协同工作。
希望对您有所帮助。