今天跟大家聊一聊 redux 的調(diào)試工具刀诬,熊師傅介紹框架有一個原則咽扇,言簡意賅,指望手把手送到嘴邊的朋友請繞道陕壹,謝謝质欲。但是有任何疑問,可以在下方留言帐要,熊師傅看到都會解答把敞,當(dāng)然前提是經(jīng)過思考和研究之后的問題。
最近發(fā)現(xiàn)一個問題榨惠,人隨著年齡的增長奋早,記憶力越來越差,但是理解東西的能力卻在增長赠橙。不知道大家有沒有這樣的感受耽装,很多半年或幾個月前不理解而放棄的東西,如今回過頭來一看期揪,有一種恍然大悟的感覺掉奄。
引用方法:
devtools界面(有錯誤,下方糾正)
補(bǔ)充凤薛,糾錯:
基于reset,revert,和sweep,commit特意去官網(wǎng)查了查
There are four buttons at the very top. “Reset” takes your app to the state you created the store with. The other three buttons work together. You might find it useful to think of them like you think of Git commits. “Commit” removes all actions in your log, and makes the current state your initial state. This is useful when you start working on a feature and want to remove the previous noise. After you’ve dispatched a few actions, you can press “Revert” to go back to the last committed state. Finally, if you dispatched some actions by mistake and you don’t want them around, you can toggle them by clicking on them, and press “Sweep” to completely remove all currently disabled actions from the log.
這里給大家翻譯一下:
1.reset: 重置
2.revert: 在commit一個狀態(tài)之后姓建,恢復(fù)到上一次commit的狀態(tài)(類似git)
3.sweep: 如果你某些action dispatch錯誤了之后,可以通過這個刪掉
4.commit: 提交保存某一刻的狀態(tài)
demo地址缤苫,建議親自跑一跑 ^ . ^