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
1
vote
1 answer

rxjs momentjs filter last 30 days

I have an object array using the following model: export interface Data { id: number qt: number date: string } I use Akita's store and I would like to filter my object table so that I only have the results for the last 30 days. …
Boubou
  • 11
  • 1
1
vote
0 answers

How to use angular cli schematics that are not the defaults one?

I've an Ionic application. I now want to use Akita as state management in my project. By default, Akita tries to replaces "cli": { "defaultCollection": "@ionic/angular-toolkit" }, by "cli": { "defaultCollection": "@datorama/akita" …
J4N
  • 19,480
  • 39
  • 187
  • 340
1
vote
1 answer

How to store multiple model query into single state store State Management

I want to create single store with multiple query state models. So in particular component or service wherever i want there select particular from store. is this possible with Akita State Management. for example: @Injectable({ providedIn: 'root'…
cj devin
  • 1,045
  • 3
  • 13
  • 48
1
vote
1 answer

Trying to figure out a clean way to perform actions on each array item using observables

I working on trying to clean up a complex chain of observables. I am looping through an array of items returned from my akita store and performing actions on each item and then storing them if they have been modified. I currently have a working…
Reyco
  • 11
  • 1
1
vote
2 answers

Benefit of keeping user interface state in a Redux store?

The NGRX official demo application keeps layout state in the store. This Akita Article also keeps state like searchTerm etc in the Akita EntityStore. Just curious whether there there are additional benefits to keeping user interface state in…
Ole
  • 41,793
  • 59
  • 191
  • 359
0
votes
0 answers

Akita partial update do not call subscribers

I am new to Akita. SO maybe is something very simple! I got a usager object like this: export interface User { id: number; username: string; modules?: Module[]; permissions?: Permission[]; } This usager are in a Auth Store and…
Pierre-D Savard
  • 529
  • 3
  • 16
0
votes
0 answers

Use Akita Store with Apollo Client

I have developed a small GraphQl API and I am now using it as a React project as I start. I used to use Akita Store (now Elf) as a store and wondered if it was still relevant to use it with an Apollo customer. Akita Store has interests. The Apollo…
Alkapoun
  • 21
  • 2
0
votes
0 answers

Converting paginated server response to Akita paginated response gives me a list of 100 copies of the last element. Why?

I already have another component that behaves the exact same way as the one I'm building now, but somehow now my element list ends up being just 100 copies of the last element the server returns. I have a small function that converts the standard…
morgred
  • 969
  • 5
  • 15
  • 26
0
votes
1 answer

angular akita very strange behavior

Here I am getting data from storage sendRequest() { this.userservise.getAllUsers(...) console.log("bedore") this.query.selectAll().subscribe(users => { console.log("inside") this.users = users }) …
Tidus213
  • 1
  • 4
0
votes
1 answer

How should I use 2 way binding in Angular with Akita readonly objects?

I have an Akita store that gets populated with data from server. I am trying to get an object from the store and edit it using angular two way binding [()]. Any time I try to change the value of the object (in the template HTML by typing in a field…
DaFoot
  • 1,475
  • 8
  • 29
  • 58
0
votes
1 answer

Chaining `and` function to `selectAll` in spec file throws an error

I'm trying to follow official Akita docs on unit testing with Angular: https://datorama.github.io/akita/docs/angular/tests/. However I'm having problems with mocking TodosQuery return value. This is the specific…
hhusnjak
  • 63
  • 5
0
votes
2 answers

Akita query this.selectAll returning empty list before service call completes

This is my widgetquery.ts @Injectable({ providedIn: 'root' }) export class WidgetQuery extends QueryEntity { public Widget$: Observable = this.selectActive().filter(k => !!k); public WidgetHistorikk$:…
vikingsteve
  • 38,481
  • 23
  • 112
  • 156
0
votes
1 answer

Angular: Where to Place akitaConfig

I've tried placing akitaConfig directly in the constructor of my app.component.ts file, which has it being called before anything else, but it doesn't seem to properly configure the data stores created afterwards. I'm trying to set resettable to…
Eric R
  • 673
  • 2
  • 9
  • 15
0
votes
0 answers

Why are rxjs pipe() operators not included in code coverage reports?

The Problem rxjs map() is not included in istanbul code coverage report, despite the lines being tested. The other questions related to this cover http-testing, which this isn't about. I need to either find a way to test pipes or exclude statements…
micaminoff
  • 26
  • 3
0
votes
1 answer

Angular with Akita and Rxjs having issue with foreach inside outer observable

I am new to Angular with Akita. I have an application where the users are loaded and set in the store. all user have an initial imageUrl property set to eg: 'http://testxxxxxx' The component query the store for all users, and pipe to calls a method…
Mukil Deepthi
  • 6,072
  • 13
  • 71
  • 156