“res”值是一个对象,它不检索与选择器相关的数据,在其他地方工作,但实际上是获取这个对象。为什么会这样?
constructor(
private serviceStore: Store<DataState>,
) {
searchForLatest$ = createEffect(() =>
this._actions.pipe(
ofType<GetLatestRequestService>(GetLatestData),
withLatestFrom(({ id }) =>
this.serviceStore.select(getlatestData(id)),
mergeMap(res => {
actionsObserver: {
closed: false,
hasError: false,
isStopped: false,
observers: [SkipSubscriber],
thrownError: null,
_isScalar: false,
}
operator: {
compare: undefined
keySelector: undefined
}
reducerManager: {
closed: false
dispatcher: DevtoolsDispatcher {_isScalar: false, observers: Array(1), closed: false,
isStopped: false, hasError: false, …}
hasError: false
initialState: undefined
isStopped: false
observers: [MapSubscriber]
reducerFactory: (reducers, initialState) => {…}
reducers: {uiContext: ƒ, parties: ƒ, user: ƒ, organizationsDetail: ƒ, activeRoute: ƒ, …}
thrownError: null
_isScalar: false
_value: (state, action) =>
}
Source: {
actionsObserver: ActionsSubject {_isScalar: false, observers: Array(1), closed: false,
isStopped: false, hasError: false, …}
operator: MapOperator {thisArg: undefined, project: ƒ}
reducerManager: ReducerManager {_isScalar: false, observers: Array(1), closed: false,
isStopped: false, hasError: false, …}
source: Store {_isScalar: false, actionsObserver: ActionsSubject, reducerManager:
ReducerManager, source: Observable}
_isScalar: false
_isScalar: 假