I have a store with init data related to my component, an example of this data is a string with the apiPath.
ngOnInit() {
// this store contains data related to the component
this.store.dispatch(this.searchActions.addPageData(this.pageData));
}
Then I have another action that requires data from the previous store and gets triggered whenever there is a route param change:
this.route.params.subscribe((params: Params) => {
this.store.dispatch(this.searchActions.routerParamsSearchPageChanged(pageFilters));
})
How do you wait until for the first action to fill the store, to dispatch the second action.