Async Computed Values
See original GitHub issueI’ve been wanting something like vue-async-computed
for Vue’s composition API, but couldn’t find anything so I created it myself. I made a gist with an explainer and an initial implementation here.
Because of its generic nature and broad use cases, the useAsyncComputed
function may be a nice counterpart to the existing useAsyncState
.
What do you think?
Issue Analytics
- State:
- Created 3 years ago
- Comments:19 (19 by maintainers)
Top Results From Across the Web
Async Computed in Components - VueJS? - Stack Overflow
Computed properties are basically functions that cache their results so that they don't have to be calculated every time they are needed.
Read more >How To Use Asynchronous Computed Properties in Vue.js ...
Computed properties in Vue let you perform complex operations or data formatting while maximizing performance with dependency calculations that ...
Read more >Async Computed Properties > The Delightful World of Vue
So this is a long way of saying that computed properties can only do synchronous work: they must return a value immediately. If...
Read more >Async computed properties for Vue.js - GitHub
Just like normal computed properties, async computed properties keep track of their dependencies, and are only recalculated if those dependencies change. But ...
Read more >vue-async-computed - npm
Async computed properties for Vue. Latest version: 3.9.0, last published: 2 years ago. Start using vue-async-computed in your project by ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
One drawback though, is that you can’t direct access
evaluating
in the template then. Might be better to pass it as a ref (orevaluating
&evaluatingRef
as the same time, not sure)I’ll give it a try. First contact with Storybook for me, but the other functions should provide enough learning material. 🙂