2016-09-30 32 views
0

在這裏我有/products/mobile路線陣營路由器不會重新繪製路線容器查詢參數更新後

enter image description here

點擊過濾器,我使用的反應 - 路由器終極版

做route.push後enter image description here

這裏它似乎react-router-redux發射位置改變動作,但它不重新呈現任何視圖(頁面保持不變,不用新的參數調用組件重新裝入)。只是在瀏覽器中更新網址。

enter image description here

我使用this.props.router.push(/products/mobile?manufacturer=Apple) 進行路線的轉變。

+0

爲什麼當用戶選擇過濾器時,當您已經有能力執行操作時,您希望它重新呈現?您可以使用替換方法來更新位置 – abhirathore2006

回答

0

檢查react router docs也許你應該嘗試使用:

this.props.router.push({ 
    pathname: '/products/mobile', 
    query: { manufactuerer: 'Apple' } 
}) 

讓我知道。