Closed lomchik closed 4 years ago
I can confirm the behaviour. I'll see what I can do.
@markwhitfeld do you have any insight on how select
works? If I debug I can see that the UpdateAnotherState
action is dispatched and the returned function from TodoState.entities
gets called. The that
variable points to the correct class.
Opened branch issue-206
.
Hello ! :)
Same issue for me ! Are there any plans to fix this issue?
Thanks a lot for this great lib !
I would like to fix it but I've no idea what might cause this. I don't know enough about the inner workings.
I think it's about how the selectors are created in the test, just checking.
There isn't a bug in the library, it's the test what doesn't work properly. I test it in a app, and it works properly, only emits once.
For the answer to the issue i put on the ngxs/store repository, it should be the same here. Probably what your getting the factory function, that's also a selector.
I refactored the selectors to use createSelector
and it seems to be working. I will make a release within the next few days.
👍 Nice @JanMalch , really interesting to have this ready to production.
I think is a must for all state management libraries(Akita have it by default), to be able to do basic operations with entities(create/update, delete...). And it's great and descriptive the way to define actions without the need to write more code:
new UpdateActive(TodoState, { done: true })
Probably will be easy to extend this to add more generic Actions for the needs of each App:
Make a custom generic Actions for search.
Cache
or any other need
I probably include soon ngxs/store and ngxs/entity-state in a company project.
Instead of repro steps I added test