Questions tagged [akita]

Akita is a state management pattern, built on top of RxJS, which takes the idea of multiple data stores from Flux and the immutable updates from Redux, along with the concept of streaming data, to create the Observable Data Stores model.

Akita is a state management pattern, built on top of RxJS, which takes the idea of multiple data stores from Flux and the immutable updates from Redux, along with the concept of streaming data, to create the Observable Data Stores model.

Akita encourages simplicity. It saves you the hassle of creating boilerplate code and gives powerful tools with a moderate learning curve, suitable for both experienced and inexperienced developers alike.

46 questions
4
votes
2 answers

Delay observable flow while BehaviorSubject value === false

I've got an application that performs HTTP requests every 2 seconds and updates the view. Problem is, that I have to do some user-triggered CSS animations that take approximately one second and often get broken because Angular updates the DOM while…
Klemen Fajs
  • 148
  • 2
  • 6
3
votes
0 answers

Adding an object to nested array using Akita state library - Angular 9

I have the next entity structure inside my Akita Store: { id: 1, values: [ {valueId: 1.1, data: [ {dataId: 1.3, text: 'abc'}, {dataId: 1.4, text: 'cba'} ]} ]; } I'm trying to add another Object to…
Anna
  • 131
  • 2
  • 11
3
votes
1 answer

Why does Akita statestore return an empty entity rather than updated entity?

I am using Akita as a state store for my Angular application. I am successfully fetching data from a backend server and populating my store (data is displayed in components) but when I try to update an entity in the store it emits an empty object. I…
DaFoot
  • 1,475
  • 8
  • 29
  • 58
3
votes
2 answers

Akita and Angular Error: StaticInjector and NullInjector Store, Query

I got into an error with Akita state management implementation on the Angular project. I will just provide a short answer in order for some people like me could resolve this issue. There is no clear understanding of this in Akita docs and…
Yevheniy Potupa
  • 537
  • 5
  • 12
2
votes
1 answer

How to add object to the existing dynamic Akita store which contains Array using angular

I'm storing dynamic values in Akita store without creating a Model. I'm trying to add a object to the existing array from store, I'm new to akita so tried deep cloning of akita store values and then pushed that object to the array and set the…
balajivaishnav
  • 2,795
  • 4
  • 23
  • 38
2
votes
1 answer

Architecting program so that Angular does not re-render the MediaStream component every time an update is pushed to the store?

The example Angular application I have created demonstrates the problem I am having, this application can be found here Basically I have two stores, I am using the state management library Akita for these stores. Both are Entity Stores, the first…
Kirkify
  • 318
  • 2
  • 12
1
vote
3 answers

Angular Akita only setting the last value in an array

I am new to Angular with Akita state management. I am trying to set the array of values to the entitystate. but for some reason only the last item in the array is getting set. But the number of values is correct. ie. i have 14 different items in the…
Mukil Deepthi
  • 6,072
  • 13
  • 71
  • 156
1
vote
1 answer

How should I structure my Angular service with Akita store?

I'm using Akita entity data stores to cache data on the front end of an Angular application. In my service I have some functions something like this: setPropertyOfEntity(entityId, newValue): void { store.update(entityId, {propertyName:…
DaFoot
  • 1,475
  • 8
  • 29
  • 58
1
vote
1 answer

Angular Using Akita store ngOnInit not working on first load

I have an issue with my Angular10 application using Akita store. When I start/refresh my application on my component page I see LOADING on my component. However via the console it looks like the store has the items loaded and my console.logs are…
1
vote
1 answer

Angular2: get a pipe that selects from an array `|` a single object

I have a bit of a complicated observable in Angular (courtesy of using Akita, I cannot change this), it's a |'ed Observable of either an array of Dinosaur objects, or a single Dinosaur object, or undefined: import { QueryEntity } from…
Yellow
  • 3,955
  • 6
  • 45
  • 74
1
vote
0 answers

How to avoid "this.fireAuth.auth.createUserWithEmailAndPassword is not a function" when using akita-ng-fire

I've just followed most of the akita-ng-fire example + doc to setup the auth in my ionic project. I've installed @angular/fire(6.0.2), akita-ng-fire(1.5.13), firebase(7.19.1), angular lib(10.0.0), ionic libs(5.0.0). Here is my model: export…
J4N
  • 19,480
  • 39
  • 187
  • 340
1
vote
1 answer

Using Akita data store, how can I select all items where 2 properties match based on OR?

I want to select values from an Akita store based on 2 properties, either of which should match the thing I'm looking for. I started with a simple (added the filterBy [] knowing I'd want to filter on more than one thing) : this.myQuery.selectAll({ …
DaFoot
  • 1,475
  • 8
  • 29
  • 58
1
vote
1 answer

angular material dialog with tabs - content of tab is not visible if switching tab when the dialog loads

I am trying to achieve opening a dialog that has tab group with 2 tabs, and immediately switching to the second tab when the dialog loads. The issue is that the tab switches, but the content of the tab is not visible. It exists, but it is out of…
RoiTr
  • 136
  • 11
1
vote
1 answer

Appropriate way to implement the base abstract state with Akita

I've tried to implement such a thing and I'm a bit confused. Suppose I need to implement variety of grid based page which designed more or less the same way, but each of them has some peculiarities. That's why I need some base abstract store/query…
Don Tomato
  • 3,311
  • 3
  • 30
  • 48
1
vote
1 answer

Angular testing service with akita query - mock data

Im working with Akita state manager for angular. I have some service / class which is subscribing to one of my queries. Im trying to mock some data into my query with jasmine createSpyObj. This is my service (part): export class SomeService…
Mateusz Kudej
  • 447
  • 1
  • 8
  • 23
1
2 3 4