In my Angular/NGRX application I have two reducers, reducerA
and reducerB
.
reducerA
retrieves a user ID;reducerB
i have an action called GET_ALL_POSTS
.How can I wait for reducerA
to resolve before calling reducerB
.
Assuming you are doing this with an effect, you could map the GET_ALL_TRANSACTIONS action when the first one finishes. eg.
retrieveUserId.pipe(
switchMap((userId) => {
new GET_ALL_TRANSACTIONS()
})
)