Skip to content

Is there a way to get results in other functions? A promise way? A subscribe way? #1254

Answered by kitten
frederikhors asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, using the client imperatively in any binding is recommended if the result is used outside of the normal flow of the UI, i.e. outside of the framework anyway.

I also before I get to a conclusion have to mention that overusing cache-and-Network often does more damage than what it's worth.

Any usage of an imperative method still goes through the usual flow of results, so suppose you have all three options of request policies availed, the usage of cache-and-network doesn't make sense, because there's nothing to update. You will likely always want to use cache-first or network-only imperatively.

When you use cache-and-network imperatively with a promise it obviously won't work since it wi…

Replies: 2 comments 11 replies

Comment options

You must be logged in to vote
11 replies
@kitten
Comment options

@frederikhors
Comment options

@frederikhors
Comment options

@JoviDeCroock
Comment options

@frederikhors
Comment options

Answer selected by JoviDeCroock
Comment options

You must be logged in to vote
0 replies
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