Questions tagged [angular-redux]

angular-redux is Integration of your redux store into your Angular applications. Use this when dealing with Questions related to redux with Angular applications

68 questions
7
votes
1 answer

property dispatch does not exist on type 'Observable' issue when using redux in angular 6

I am trying to do simple redux application with angular 6. reducers.ts import { login,logout } from '../actions/actions'; export interface appReducer { login:boolean, user:String } const initialstate:appReducer={ login:false, …
Pranab V V
  • 1,386
  • 5
  • 27
  • 53
5
votes
0 answers

Type 'Dispatch' is not assignable to type 'Dispatch'

hello i'm try to user redux with angular. but i have this error message when i try to run my angular app: ERROR in node_modules/@angular-redux/store/lib/src/components/ng-redux.d.ts(10,31): error TS2420: Class 'NgRedux' incorrectly…
4
votes
2 answers

Is the first() operator will do the unsubscribe automatically?

I want to unsubscribe the observable, shall i use the first() operator for unsubscribe? Example below, Rx.Observable.interval(100) .do(x => console.log(x)) .first() .subscribe(x => x); Is the above code will do automatic unsubscribe or need to do…
Jeyabalan Thavamani
  • 3,057
  • 8
  • 21
  • 33
3
votes
1 answer

'formDirective' is defined as an accessor in class 'ControlContainer', but is overridden here in 'ConnectArrayDirective' as an instance property

After updating angular 9 to the latest version ("@angular/core": "~11.0.0-next.0",). I got the below error, however, I have updated the latest version of @angular-redux/form, @angular-redux/router and @angular-redux/store "@angular-redux/form":…
San Jaisy
  • 15,327
  • 34
  • 171
  • 290
3
votes
1 answer

NGRX Redux store -- selecting only a slice of the state returns 'undefined' even if intellisense autocompletes and everything in the model matches

Using @ngrx-redux/store, the latest verson. I can select via string any slice of the state. When I try to access a property, it returns 'undefined' errors. Syntax: this.loadedClients = this.store.select( state =>…
SebastianG
  • 8,563
  • 8
  • 47
  • 111
3
votes
1 answer

Angular + Redux Jasmine testing "Cannot read property 'dispatch' of undefined" randomly thrown in runs

I have an integration test that is dependant on 2 services which I am providing to the testbed with stubs. When I am testing a function updateCategory() in the subscribe block of this category I have a function ngRedux.dispatch({type:…
SebastianG
  • 8,563
  • 8
  • 47
  • 111
3
votes
1 answer

Angular7 + REDUX: Error: "ExpressionChangedAfterItHasBeenCheckedError: Expression has changed after it was checked

I've checked all existing threads on here and went through quite a bit of extra troubleshooting. This issue has been plaguing me for a few weeks now and not sure what to do. I have a redux architecture in angular7 and I'm simply dispatching actions…
SebastianG
  • 8,563
  • 8
  • 47
  • 111
3
votes
1 answer

Does NGXS supports undo like redux-undo

I'm looking into adding a state management to my web app. I'm using Angular 6. I've seen this library, which looks promising: https://github.com/angular-redux/store But I'm agreeing with the writer of NGXS that decorators are probably the right…
Harel M
  • 183
  • 7
3
votes
1 answer

Angular 4 Redux select issue (basic)

I am still in the early stages of learning Angular 4 and Redux. I have a component that gets information from the store. It works fine IN THE VIEW. But when I try to access the same information from within the component, I get an object instead of…
J Seabolt
  • 2,576
  • 5
  • 25
  • 57
3
votes
2 answers

How can I access angular-redux store from child module?

In my angular app I use angular-redux for application state management. In my main module I defined my redux store. Like this: export class MainModule { constructor(private ngRedux: NgRedux, private devTools:…
Gregor Doroschenko
  • 11,488
  • 5
  • 25
  • 37
3
votes
2 answers

Redux store should be one for each module or one for whole application comprising of a multiple mudules

I am integrating or sort of rewriting my Angular 1 application with Redux. It has the following architecture: app1 => App1 running on diff subdomain app2 => App2 running on diff subdomain and so on... shared => Shared modules(with multiple…
Rajat Vijay
  • 102
  • 1
  • 9
2
votes
1 answer

Resolver vs Redux

I have been working for quite some time now in small/medium sized projects with Angular and as long as there is some data which needs to be loaded from a server, the team directly goes for storing it into a Redux store. This allows for the data to…
AGoranov
  • 2,114
  • 3
  • 15
  • 27
2
votes
1 answer

@angular-redux/store trying to test component that uses async on a property decorated with @select() - documentation does not exist

I am trying to test a form that has a select form control with options that are iterated with ngFor with | async pipe on property 'videoCategories' decorated with @select() from the redux package. I can't make that form control valid for a test…
SebastianG
  • 8,563
  • 8
  • 47
  • 111
2
votes
1 answer

Redux with tassign in Angular(typescript) trying to join state.array and action.array but getting state.array.join is not a function?

Redux function: function setAllVideos(state, action) { return tassign(state, { allVideos: state.allVideos.join([action.data]) });} Declaration + State: allVideos: Array; AND allVideos: [], I just can't seem to get the syntax…
SebastianG
  • 8,563
  • 8
  • 47
  • 111
2
votes
2 answers

Fire an action before sending request in redux-observable epic

I want to fire an action before sending a request to the server. Here is my code: public fetchUserPrjects(action$: Observable, store: Store) { return action$.pipe( ofType(ProjectActionType.FETCH_USER_PROJECTS), …
Amir Movahedi
  • 1,802
  • 3
  • 29
  • 52
1
2 3 4 5