2017-05-03 52 views
0

我有一個react-redux-firebase應用程序顯示公共和私人數據。隨着react-redux-firebase重新連接到firebase登錄後

我在第一呈現進程連接數據庫火力地堡中所示complete simple example

在嵌套部件的按鈕觸發props.firebase.logout()方法,並連接到火力地堡我的所有數據消失,甚至公衆的。

有沒有正確的方法來重新連接到數據庫和REDX存儲以再次查看公共數據?

目前我做了一個可怕的window.location.reload(),我想避免這種情況。

感謝名單了很多,
Gionatan

回答

0

上登出了Redux商店的火力段內保持一定的數據目前不支持,但它是一個偉大的想法。 I opened an issue to track添加一個應該支持您的用例的功能。

現在,如果要調用firebase.logout()可以重定向到有你的公開數據聽衆另一頁。事情是這樣的:

this.props.firebase.logout() 
    .then(() => { 
    // redirect to a route that has listeners with your public data 
    this.context.router.push('/someroute'); 
    }) 

披露:

我的作者做出反應,終極版,火力