Skip to content

Does elf support local state in angular? #500

Answered by luii
jon9090 asked this question in Q&A
Discussion options

You must be logged in to vote

For retrieving Entities from you backend this would be really redundant. Sure you have a loaded and loading state but query already has this functionality and is caching it for you, if you dont set a staleTime/gcTime (or aleast a really high one) in query it wont be garbage collected until that time (means it wont get cleaned up). And as long as this time isnt reached you have a cached result which would be returned first and background fetched right after it.

At the baseline i dont recommend to do so, i had it like this and almost every elf store i had was replaced by a service with one or more query function. For any non entity sure use elf or akita but when it comes down to entities, t…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@jon9090
Comment options

@NetanelBasal
Comment options

@jon9090
Comment options

@luii
Comment options

Answer selected by jon9090
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants