this.counter$ = store.select(fromExample.getCounterCounter)之后马上subscribe
生活随笔
收集整理的這篇文章主要介紹了
this.counter$ = store.select(fromExample.getCounterCounter)之后马上subscribe
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
這個類型為Store<fromExample.State>的變量:
本質是個Observable:
store的source字段的_value里,包含了兩個state的初始值:
this.counter$ = store.select(fromExample.getCounterCounter)之后馬上subscribe
先執行this.counter$這個Observable自帶的operator:
這個DistinctUntilChangedOperator來自:
map操作符執行的邏輯就是:
source => pathOrMapFn(source … )
projectFn.apply最終會調用應用程序傳入store.select里的函數:
我們自己實現的getter在這里被調用:
調用到應用程序自己的projector了:
更多Jerry的原創文章,盡在:“汪子熙”:
總結
以上是生活随笔為你收集整理的this.counter$ = store.select(fromExample.getCounterCounter)之后马上subscribe的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 风之大陆怎么增加金装爆率(风向怎么表示)
- 下一篇: this.counter$ = stor