我的选择器很简单
export const efficiency = createSelector(
state => ({ ...state.dashboard}),
dashboard => dashboard.efficiency
);
和商店订阅
this.store
.pipe(
select(efficiency )
)
.subscribe(state => {console.log(state)})
由于某种原因,国家/地区订阅调用了两次。 另外,当选择器初始化时,它们是否可以限制订阅调用?