Replies: 1 comment 7 replies
-
It should be with the value from the db. https://github.com/datorama/akita/blob/master/libs/akita/src/lib/persistState.ts#L241 |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Background:
Akita is set up to persist storage to indexdb (using localforage).
I have the following code in the constructor of an angular service.
However, when the selectPersistStateInit() fires and triggers the refQuery queries the store has not actually been fully initialized.
The store contains only the initial state, not the state from the value in indexdb.
The store is defined as:
So, it appears that the selectPersistStateInit() emits as soon as the store is initialized with the default value. Is there any way to know when the persisted state has been loaded to ensure my queries return the correct values?
Beta Was this translation helpful? Give feedback.
All reactions