簡體   English   中英

在響應本機上的firebase api請求不起作用

[英]firebase api requests on react native not working

每當我單擊注銷按鈕(獲取“ this.firebase.unauth”)時,我都在為我的應用程序使用firebase。 我的api請求出了什么問題?

 logout() { this.firebase.unauth(); } //this is the api request onPress() { Actions.logout(); } //this is the action method. 

您是否正在使用import firebase from 'firebase'; 在那種情況下,您不需要this ,只需firebase.unauth(); 應該這樣做。 但是,真的有一種叫做unauth()的方法嗎? 該文檔指的是使用:

firebase.auth().signOut().then(function() {
  // Sign-out successful.
}).catch(function(error) {
  // An error happened.
});

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM