You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In an application, I want to set the loading state to true, do some operations, some store updates, wait for some network requests, and after all is done, set loading to false. However, the moment I do a regular update to the store, the loading state is set back to false, even though I did not set it.
In the provided example, you can see that I only use setLoading(false) in the constructor of the service.
In the TodosService on line 32, I set loading to true, but never set it to false. However, in the UI(and in the console log) you can see that the loading state is set to false somehow.
If I move the delay(2000) on line 32, you'll see that the loading state is set to false after 2 seconds. This coincides with the store update(even though I'm not specifically telling it to update the loading state).
Please provide a link to a minimal reproduction of the bug
Is this a regression?
No
Description
In an application, I want to set the loading state to true, do some operations, some store updates, wait for some network requests, and after all is done, set loading to false. However, the moment I do a regular update to the store, the loading state is set back to false, even though I did not set it.
In the provided example, you can see that I only use
setLoading(false)
in the constructor of the service.In the
TodosService
on line 32, I set loading to true, but never set it to false. However, in the UI(and in the console log) you can see that the loading state is set to false somehow.If I move the
delay(2000)
on line 32, you'll see that the loading state is set to false after 2 seconds. This coincides with the store update(even though I'm not specifically telling it to update the loading state).Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/akita-todos-app-3behcu?file=src/app/todos/state/todos.service.ts
Please provide the exception or error you saw
No response
Please provide the environment you discovered this bug in
No response
Anything else?
No response
Do you want to create a pull request?
No
The text was updated successfully, but these errors were encountered: