Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Access state inside an ngrx effect
// In the Effect's constructor, inject store.
constructor(private store: Store<AppState>)
fetchUserProfile$: Observable<Action> = this.actions$.pipe(
mergeMap(([action, appState]) => {
return this.http
map((response: any) => {
return new FetchUserProfileSuccess(;
catchError(error => of(new FetchUserProfileFailure(error)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.