965 questions
0 votes
1 answer
88 views
NgRx computed not Update Value when used in NgRx Store
I have a computed in my signal store, which should react on a value change but it just fires 1 time at creating and not when signal values are changing const initialData = { gridItems: [] as ...
0 votes
0 answers
47 views
Resubscribing to NGRX Effect loading old data
I'm having an odd interaction with NGRX and Routing whereby when I revisit a page I have previously been on and subscribe to an Effect it gets the data twice; but this only happens when the page I ...
-1 votes
1 answer
99 views
upsertMany not picking up multiple updates for same id record
I am using the NGRX upsertMany and sending multiple partial as an array but it looks like when there are multiple updates in the same array for the same record only first one is picked e.g. when the ...
1 vote
0 answers
52 views
Angular unit test of @ngrx/effects, actions not purged
I defined a number of effects, whose first one has dispatch: false: readonly abort$ = createEffect(() => { return this.actions.pipe( ofType(myActions.abort), tap(...
1 vote
0 answers
20 views
actions$ not injected in constructor of effect [duplicate]
I use NGRX 18 and Angular 18, I am trying to inject actions$ into my effect via constructor, but this doesn't work import { inject, Injectable } from "@angular/core"; import { Actions, ...
2 votes
1 answer
83 views
My Angular NGRX reducer updates the state, but the associated effect doesn't trigger - but only sometimes
I'm going to try and be as thorough as I can describing the issue I'm having. I'm working in an enterprise proprietary codebase so there's not much actual code I can share, but I'll do my best if ...
1 vote
1 answer
93 views
Why is the code coverage missing for lines where inject() is used in functional ngrx effect?
I am working on an Angular project and using karma.js with jasmine to write and execute unit tests. My problem is that if I want to unit test the functional ngrx effect without the TestBed, the ...
2 votes
1 answer
783 views
effect doesn't work with Angular v18 and ngRx
I am using Angular 18 and ngRx. I wrote a following effect: import {Injectable} from '@angular/core'; import {Actions, createEffect, ofType} from '@ngrx/effects'; import * as PostsActions from '../...
1 vote
1 answer
74 views
Typescript error: The 'this' context of type '.....' is not assignable to method's 'this' type
orgChangedSuccess$: Observable<Action> = this.actions$ .ofType(orgActions.UPDATE_ORG_SUCCESS) .map(toPayload) .switchMap((org) => { return Observable.combineLatest( ...
0 votes
1 answer
53 views
Problem with ngrx while tried to login with correct username and password
I am trying to create a login page. I am using angular with ngrx for state management. login.action.ts import { createAction, props } from "@ngrx/store"; export const loginRequest = ...
2 votes
0 answers
217 views
Unit test effect in Angular
I am using Angular signal and to execute change in signal using effect function. How to mock signal to trigger effect during unit test. import { effect, Injector, Signal } from '@angular/core'; ...
3 votes
3 answers
746 views
Why the Actions object from NgRx effects cannot be injected despite including the necessary module and no circular dependency?
So I'm working on a colaborative document editor application and I'm using NgRx effects here to induce a state change based on another state change. I've installed the package, configured the app....
0 votes
1 answer
207 views
Subscription next(), error(), or complete() methods of http request not triggered when request times out
In my Angular + ngrx application, I have an @Effect triggered by an Action. Code is below @Effect() customAction$ = this._actions$.pipe( ofType<CustomAction>(Actions.CustomAction), tap(()...
1 vote
2 answers
338 views
Why does my state observable tell me Type must have a [Symbol.iterator]()
Framework: Angular v18.1.0 Dependencies: RxJS v7.8.0 @ngrx/effects v18.0.2 @ngrx/store v18.0.2 Given the following RxJS architecture. I have a simple reducer with one state and an interface with a ...
0 votes
1 answer
70 views
Ngrx Pattern to set propery IsLoading while fetching new data from server
I have a store with actions, effects, reducers, and selectors. I have a component on the screen, and the component represents a store object, obtained via a selector. What I'm trying to do is, I think,...