2016-12-30 18 views
0

我使用React BoilerplateReact Redux Toastr,我希望能夠使用React Intl的消息調用傳情。在一個傳奇內呼叫反應回覆傳說

我試過在組件內部調用它,但是當toastr正在進行狀態更新時,反應會警告我作爲反模式。我也試圖在一個傳奇中打電話,但是我無法包含國際電話留言。

toastr.error(formatMessage(messages.userNotFoundErrorLabel)); 

什麼是使用國際化信息調用toastr並充分利用redux的最佳地點?

回答

0

這可以在Component的componentDidUpdate函數內完成,不需要警告。