React在組件中直接使用dispatch好呢 還是用action函數來處理優雅
1 回答

飲歌長嘯
TA貢獻1951條經驗 獲得超3個贊
componentWillUnmount() {
this.timer && clearTimeout(this.timer);
this.props.dispatch({type : 'USER_ALL_CLEAR'});
}
componentWillUnmount() {
this.timer && clearTimeout(this.timer);
this.props.userAction.clearAll();
- 1 回答
- 0 關注
- 7653 瀏覽
添加回答
舉報
0/150
提交
取消